git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7c531a6
)
fix: Reg upload public key: db private key can't be null
author
Yasin
<mohammed-yasin.rahman@lip6.fr>
Thu, 17 Jul 2014 16:10:24 +0000
(18:10 +0200)
committer
Yasin
<mohammed-yasin.rahman@lip6.fr>
Thu, 17 Jul 2014 16:10:24 +0000
(18:10 +0200)
portal/registrationview.py
patch
|
blob
|
history
diff --git
a/portal/registrationview.py
b/portal/registrationview.py
index
7967a91
..
f6d0291
100644
(file)
--- 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.')
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:
user_request['public_key'] = file_content
if not errors: