Improved python
authorKarl O. Pinc <kop@karlpinc.com>
Sun, 14 Jul 2024 03:07:59 +0000 (22:07 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sun, 14 Jul 2024 03:07:59 +0000 (22:07 -0500)
src/pgwui_core/core.py

index 679bcf82e08649a7bd254f364b681888353f4824..7abecec5ef50005a2c86fda944d6ef6afee9692b 100644 (file)
@@ -469,10 +469,7 @@ class UploadDoubleFileFormMixin(UploadFormBaseMixin):
         super().read()
 
         post = self.uh.request.POST
-        if 'last_key' in post:
-            self['last_key'] = post['last_key']
-        else:
-            self['last_key'] = ''
+        self['last_key'] = post.get('last_key', '')
 
     def write_response(self, response):
         '''