mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
simpler code - same function
This commit is contained in:
parent
9b69980a6c
commit
a0d9bf692e
@ -195,7 +195,7 @@ class FileManagementFormView(MultiStepFormView):
|
||||
def get_context_data(self, form, **kwargs):
|
||||
context = super().get_context_data(form=form, **kwargs)
|
||||
|
||||
if self.steps.current == 'fields' or self.steps.current == 'items':
|
||||
if self.steps.current in ('fields', 'items'):
|
||||
|
||||
# Get columns and row data
|
||||
self.columns = self.file_manager.columns()
|
||||
@ -435,7 +435,7 @@ class FileManagementFormView(MultiStepFormView):
|
||||
}
|
||||
|
||||
# Data validation
|
||||
valid = len(self.extra_context_data.get('missing_columns', [])) == 0 and not self.extra_context_data.get('duplicates', [])
|
||||
valid = not missing_columns and not duplicates
|
||||
|
||||
return valid
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user