From da8744afc3ca6d0fbc9c35825e84dcb9a52566ad Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 May 2018 18:03:16 +0200 Subject: Wizard: fix bad initialization of get_prefix --- ishtar_common/wizards.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index cffaac271..d486474d8 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -175,7 +175,7 @@ class Wizard(NamedUrlWizardView): # reinit default dispatch of a wizard - not clean... self.request = request self.session = request.session - self.prefix = self.get_prefix(*args, **kwargs) + self.prefix = self.get_prefix(request, *args, **kwargs) self.storage = get_storage( self.storage_name, self.prefix, request, getattr(self, 'file_storage', None)) @@ -201,11 +201,11 @@ class Wizard(NamedUrlWizardView): kwargs['user'] = self.request.user return kwargs - def get_prefix(self, *args, **kwargs): + def get_prefix(self, request, *args, **kwargs): """As the class name can interfere when reused prefix with the url_name """ - return self.url_name + super(Wizard, self).get_prefix(*args, - **kwargs) + return self.url_name + super(Wizard, self).get_prefix( + request, *args, **kwargs) def get_wizard_name(self): """As the class name can interfere when reused, use the url_name""" @@ -1209,11 +1209,11 @@ class SearchWizard(NamedUrlWizardView): """ return self.url_name - def get_prefix(self, *args, **kwargs): + def get_prefix(self, request, *args, **kwargs): """As the class name can interfere when reused prefix with the url_name """ - return self.url_name + super(SearchWizard, self).get_prefix(*args, - **kwargs) + return self.url_name + super(SearchWizard, self).get_prefix( + request, *args, **kwargs) def get_template_names(self): templates = ['ishtar/wizard/search.html'] -- cgit v1.2.3