From a239922e14cdfdd0845781c2ce78455adc5bc026 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 1 Sep 2025 13:33:17 +0200 Subject: [PATCH] use walrus operator for user session check --- input/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/input/views.py b/input/views.py index b71e301..04b5dc8 100755 --- a/input/views.py +++ b/input/views.py @@ -154,8 +154,7 @@ class BaseApplicationView(FormView): modell = form.save(commit=False) # Username from session if present - user = self.request.session.get('user') - if user: + if user := self.request.session.get('user'): modell.username = user.get('username') # Copy common fields if provided by the form