Fixes required for v3.2 compatibility

- Specify DEFAULT_AUTO_FIELD
- Specify output_field for annotations
This commit is contained in:
Oliver Walters committed 2021-04-20 09:14:08 +10:00
1 parent 12f1fb9526
commit 6b9145ae56
4 files changed
+19 -7

No files matched your search

+7 -1
View File
@@ -807,7 +807,13 @@ class Build(MPTTModel):
allocations = self.allocatedItems(part, output)
allocated = allocations.aggregate(q=Coalesce(Sum('quantity'), 0))
allocated = allocations.aggregate(
q=Coalesce(
Sum('quantity'),
0,
output_field=models.DecimalField(),
)
)
return allocated['q']