mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Hide fields rather than pop, to reduce warnings in CI logs
This commit is contained in:
parent
249860fa76
commit
d111e7bff0
@ -613,7 +613,7 @@ class PartCreate(AjaxCreateView):
|
|||||||
|
|
||||||
# Hide the "default expiry" field if the feature is not enabled
|
# Hide the "default expiry" field if the feature is not enabled
|
||||||
if not inventree_settings.stock_expiry_enabled():
|
if not inventree_settings.stock_expiry_enabled():
|
||||||
form.fields.pop('default_expiry')
|
form.fields['default_expiry'].widget = HiddenInput()
|
||||||
|
|
||||||
# Hide the default_supplier field (there are no matching supplier parts yet!)
|
# Hide the default_supplier field (there are no matching supplier parts yet!)
|
||||||
form.fields['default_supplier'].widget = HiddenInput()
|
form.fields['default_supplier'].widget = HiddenInput()
|
||||||
@ -904,7 +904,7 @@ class PartEdit(AjaxUpdateView):
|
|||||||
|
|
||||||
# Hide the "default expiry" field if the feature is not enabled
|
# Hide the "default expiry" field if the feature is not enabled
|
||||||
if not inventree_settings.stock_expiry_enabled():
|
if not inventree_settings.stock_expiry_enabled():
|
||||||
form.fields.pop('default_expiry')
|
form.fields['default_expiry'].widget = HiddenInput()
|
||||||
|
|
||||||
part = self.get_object()
|
part = self.get_object()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user