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
1fc70d80
authored
Oct 09, 2014
by
Paul Kilgo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use clean_key instead of clean
parent
0f3d40f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
django_sshkey/forms.py
+5
-5
No files found.
django_sshkey/forms.py
View file @
1fc70d80
...
...
@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from
django
import
forms
from
django.core.exceptions
import
ValidationError
from
django_sshkey.models
import
Key
,
UserKey
from
django_sshkey.util
import
pubkey_parse
...
...
@@ -40,12 +41,11 @@ class ApplicationKeyForm(forms.ModelForm):
})
)
def
clean
(
self
):
cleaned_data
=
self
.
cleaned_data
if
'key'
in
cleaned_data
:
key
=
cleaned_data
[
'key'
]
=
Key
(
key
=
cleaned_data
[
'key'
])
def
clean_key
(
self
):
key
=
self
.
cleaned_data
[
'key'
]
key
=
Key
(
key
=
key
)
key
.
full_clean
()
return
cleaned_data
return
key
def
save
(
self
,
commit
=
True
):
instance
=
super
(
ApplicationKeyForm
,
self
)
.
save
(
commit
=
False
)
...
...
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