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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
django_sshkey/forms.py
+6
-6
No files found.
django_sshkey/forms.py
View file @
1fc70d80
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from
django
import
forms
from
django
import
forms
from
django.core.exceptions
import
ValidationError
from
django_sshkey.models
import
Key
,
UserKey
from
django_sshkey.models
import
Key
,
UserKey
from
django_sshkey.util
import
pubkey_parse
from
django_sshkey.util
import
pubkey_parse
...
@@ -40,12 +41,11 @@ class ApplicationKeyForm(forms.ModelForm):
...
@@ -40,12 +41,11 @@ class ApplicationKeyForm(forms.ModelForm):
})
})
)
)
def
clean
(
self
):
def
clean_key
(
self
):
cleaned_data
=
self
.
cleaned_data
key
=
self
.
cleaned_data
[
'key'
]
if
'key'
in
cleaned_data
:
key
=
Key
(
key
=
key
)
key
=
cleaned_data
[
'key'
]
=
Key
(
key
=
cleaned_data
[
'key'
])
key
.
full_clean
()
key
.
full_clean
()
return
key
return
cleaned_data
def
save
(
self
,
commit
=
True
):
def
save
(
self
,
commit
=
True
):
instance
=
super
(
ApplicationKeyForm
,
self
)
.
save
(
commit
=
False
)
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