forked from beba/foerderbarometer
conditionally set username so it can work local and in tests
This commit is contained in:
parent
fe8985504e
commit
233151968b
|
|
@ -219,8 +219,6 @@ class ExternView(CookieWizardView):
|
|||
for form in form_list:
|
||||
data = {**data, **form.cleaned_data}
|
||||
|
||||
data['username'] = self.request.session['user']['username']
|
||||
|
||||
if data['choice'] == 'LIT':
|
||||
if data['selfbuy'] == 'TRUE':
|
||||
data['selfbuy_give_data'] = 'False'
|
||||
|
|
@ -233,8 +231,10 @@ class ExternView(CookieWizardView):
|
|||
if data['choice'] == 'LIT':
|
||||
modell.selfbuy_give_data = data['selfbuy_give_data']
|
||||
|
||||
if user := self.request.session.get('user'):
|
||||
modell.username = user['username']
|
||||
|
||||
modell.realname = data['realname']
|
||||
modell.username = data['username']
|
||||
modell.email = data['email']
|
||||
# write type of form in some cases
|
||||
if data['choice'] in ('BIB', 'ELIT', 'SOFT'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue