Allow to use empty ModelList in Wizard
We might want to execute the wizard on a specific model even without selecting some of its records Closes #14291
This commit is contained in:
1 parent
0b69b334be
commit
d8499a4fb0
1 file changed
+4
@@ -1242,6 +1242,10 @@ class Wizard(object):
|
||||
ctx['active_id'] = self.models[0].id
|
||||
ctx['active_ids'] = [model.id for model in self.models]
|
||||
ctx['active_model'] = self.models[0].__class__.__name__
|
||||
elif isinstance(self.models, ModelList):
|
||||
ctx['active_id'] = None
|
||||
ctx['active_ids'] = None
|
||||
ctx['active_model'] = self.models.model_name
|
||||
else:
|
||||
ctx['active_id'] = None
|
||||
ctx['active_ids'] = None
|
||||
|
||||
Reference in new issue
Block a user