Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-sshkey
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2f7d586
authored
Sep 15, 2014
by
Scott Duckworth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue #1, entering blank key fails
parent
38190ed3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
django_sshkey/models.py
+5
-0
No files found.
django_sshkey/models.py
View file @
b2f7d586
...
...
@@ -60,8 +60,13 @@ class UserKey(models.Model):
def
clean_fields
(
self
,
exclude
=
None
):
if
not
exclude
or
'key'
not
in
exclude
:
self
.
key
=
self
.
key
.
strip
()
if
not
self
.
key
:
raise
ValidationError
({
'key'
:
[
"This field is required."
]})
def
clean
(
self
):
self
.
key
=
self
.
key
.
strip
()
if
not
self
.
key
:
return
try
:
pubkey
=
pubkey_parse
(
self
.
key
)
except
PublicKeyParseError
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment