an id is an int

This commit is contained in:
Adrian Manteza
2022-03-22 20:29:03 +00:00
parent 9d15112320
commit ee77d888b5
2 changed files with 4 additions and 4 deletions

View File

@ -26,12 +26,12 @@ class SolverRun(BaseModel):
def get_item(self, item_id: int) -> Item or None:
for item in self.items:
if str(item.id) == item_id:
if item.id == item_id:
return item
def get_bundle(self, bundle_id: int) -> Bundle or None:
for bundle in self.bundles:
if str(bundle.id) == bundle_id:
if bundle.id == bundle_id:
return bundle
def get_constraint_by_type(self, type: str) -> Constraint or None: