count_work bug
This commit is contained in:
parent
b4e5937b28
commit
95f444ce83
|
@ -261,8 +261,7 @@ class OperationListSerializer(serializers.ModelSerializer):
|
||||||
if obj.step.type == Step.STEP_TYPE_NOM:
|
if obj.step.type == Step.STEP_TYPE_NOM:
|
||||||
count_work = OperationWproduct.objects.filter(operation=obj).count()
|
count_work = OperationWproduct.objects.filter(operation=obj).count()
|
||||||
else:
|
else:
|
||||||
count_work = OperationMaterial.objects.filter(operation=obj).annotate(count_work=Sum('count'))
|
count_work = 0
|
||||||
print(count_work)
|
|
||||||
return count_work
|
return count_work
|
||||||
|
|
||||||
def get_equip_(self, obj):
|
def get_equip_(self, obj):
|
||||||
|
|
Loading…
Reference in New Issue