mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Fixes required for v3.2 compatibility
- Specify DEFAULT_AUTO_FIELD - Specify output_field for annotations
This commit is contained in:
@ -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']
|
||||
|
||||
|
Reference in New Issue
Block a user