From f02e267b0fb472fdbbfa3c433ad5f5a74096e7f7 Mon Sep 17 00:00:00 2001 From: Yasin Date: Thu, 17 Jul 2014 18:10:24 +0200 Subject: [PATCH 1/1] fix: Reg upload public key: db private key can't be null --- portal/registrationview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portal/registrationview.py b/portal/registrationview.py index 7967a916..f6d02912 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -142,8 +142,8 @@ class RegistrationView (FreeAccessView, ThemeView): ALLOWED_EXTENSIONS = ['.pub','.txt'] if file_extension not in ALLOWED_EXTENSIONS or not re.search(r'ssh-rsa',file_content): errors.append('Please upload a valid RSA public key.') - - user_request['private_key'] = None + # user_request['private_key'] can't be Null because all db fields are set as NOT NULL + user_request['private_key'] = "" user_request['public_key'] = file_content if not errors: -- 2.43.0