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

@ -99,12 +99,12 @@ def solution_items(variables, solver_run):
if v.varValue > 0:
if 'Item_' in v.name:
item_id = v.name.replace('Item_', '')
item = solver_run.get_item(item_id)
item = solver_run.get_item(int(item_id))
# add item to list and then remove from master item list
if item: form_items.append(item)
elif 'Bundle_' in v.name:
bundle_id = v.name.replace('Bundle_', '')
bundle = solver_run.get_bundle(bundle_id)
bundle = solver_run.get_bundle(int(bundle_id))
if bundle:
for item in bundle.items: