From 7684687dbcac662b82c723dd5d583dfab491a1c7 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 26 Aug 2019 16:13:31 +0530 Subject: [PATCH] Remove commented code --- hosting/forms.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hosting/forms.py b/hosting/forms.py index 343ead28..d98d258f 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -192,15 +192,6 @@ class UserHostingKeyForm(forms.ModelForm): KEY_ERROR_MESSAGE = _("Please input a proper SSH key") openssh_pubkey_str = self.data.get('public_key').strip() - # if openssh_pubkey_str in get_all_public_keys(self.request.user): - # key_name = UserHostingKey.objects.filter( - # user_id=self.request.user.id, - # public_key=openssh_pubkey_str).first().name - # KEY_EXISTS_MESSAGE = _( - # "This key exists already with the name \"%(name)s\"") % { - # 'name': key_name} - # raise forms.ValidationError(KEY_EXISTS_MESSAGE) - with tempfile.NamedTemporaryFile(delete=True) as tmp_public_key_file: tmp_public_key_file.write(openssh_pubkey_str.encode('utf-8')) tmp_public_key_file.flush()