mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Migrate source code to python 3.7 and refine code style
This commit is contained in:
parent
0e231a930d
commit
a4d74a09a6
55 changed files with 192 additions and 306 deletions
|
|
@ -42,7 +42,7 @@ class AddStgPool(forms.Form):
|
|||
def clean_source(self):
|
||||
storage_type = self.cleaned_data['stg_type']
|
||||
source = self.cleaned_data['source']
|
||||
have_symbol = re.match('^[a-zA-Z0-9\/]+$', source)
|
||||
have_symbol = re.match('^[a-zA-Z0-9/]+$', source)
|
||||
if storage_type == 'logical' or storage_type == 'netfs':
|
||||
if not source:
|
||||
raise forms.ValidationError(_('No device has been entered'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue