mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Cleanup errors in unit testing
This commit is contained in:
@ -1170,8 +1170,9 @@ class StockItemEdit(AjaxUpdateView):
|
||||
query = query.filter(part=item.part.id)
|
||||
form.fields['supplier_part'].queryset = query
|
||||
|
||||
if not item.part.trackable or not item.serialized:
|
||||
form.fields.pop('serial')
|
||||
# Hide the serial number field if it is not required
|
||||
if not item.part.trackable and not item.serialized:
|
||||
form.fields['serial'].widget = HiddenInput()
|
||||
|
||||
return form
|
||||
|
||||
|
Reference in New Issue
Block a user