fix bug of rancher plan id
This commit is contained in:
@@ -84,7 +84,7 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry = None, distri
|
||||
'rancher',
|
||||
'livestock_type'
|
||||
).filter(rancher=rancher, livestock_type=item.livestock_type)
|
||||
if rancher_plans:
|
||||
if rancher_plans.exists():
|
||||
# multiple count of rancher livestock on incentive plan &
|
||||
# incentive plan quantity by this livestock type
|
||||
rancher_plan_weight = rancher_plans.first().allowed_quantity * item.quantity_kg
|
||||
|
||||
Reference in New Issue
Block a user