mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1390 from SchrodingersGat/CI-fixes
Hide fields rather than pop, to reduce warnings in CI logs
This commit is contained in:
commit
c46fe354c2
@ -613,7 +613,7 @@ class PartCreate(AjaxCreateView):
|
||||
|
||||
# Hide the "default expiry" field if the feature is not 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!)
|
||||
form.fields['default_supplier'].widget = HiddenInput()
|
||||
@ -904,7 +904,7 @@ class PartEdit(AjaxUpdateView):
|
||||
|
||||
# Hide the "default expiry" field if the feature is not enabled
|
||||
if not inventree_settings.stock_expiry_enabled():
|
||||
form.fields.pop('default_expiry')
|
||||
form.fields['default_expiry'].widget = HiddenInput()
|
||||
|
||||
part = self.get_object()
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ class StockItemEdit(AjaxUpdateView):
|
||||
|
||||
# Hide the "expiry date" field if the feature is not enabled
|
||||
if not common.settings.stock_expiry_enabled():
|
||||
form.fields.pop('expiry_date')
|
||||
form.fields['expiry_date'].widget = HiddenInput()
|
||||
|
||||
item = self.get_object()
|
||||
|
||||
@ -1581,7 +1581,7 @@ class StockItemCreate(AjaxCreateView):
|
||||
|
||||
# Hide the "expiry date" field if the feature is not enabled
|
||||
if not common.settings.stock_expiry_enabled():
|
||||
form.fields.pop('expiry_date')
|
||||
form.fields['expiry_date'].widget = HiddenInput()
|
||||
|
||||
part = self.get_part(form=form)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user