mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
enrich context with form if not set
This commit is contained in:
parent
4319ba16af
commit
002706849c
@ -215,7 +215,10 @@ class FileManagementFormView(MultiStepFormView):
|
||||
if not(hasattr(self, 'file_manager_class') and issubclass(self.file_manager_class, FileManager)):
|
||||
raise NotImplementedError('A subclass of a file manager class needs to be set!')
|
||||
|
||||
def get_context_data(self, form, **kwargs):
|
||||
def get_context_data(self, form=None, **kwargs):
|
||||
if form is None:
|
||||
form = self.get_form()
|
||||
|
||||
context = super().get_context_data(form=form, **kwargs)
|
||||
|
||||
if self.steps.current in ('fields', 'items'):
|
||||
|
Loading…
Reference in New Issue
Block a user