mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Fix rdb
This commit is contained in:
parent
da6a2d7e29
commit
e9236f22a2
1 changed files with 4 additions and 3 deletions
|
@ -31,9 +31,10 @@ class AddStgPool(forms.Form):
|
|||
storage_type = self.cleaned_data['stg_type']
|
||||
target = self.cleaned_data['target']
|
||||
have_symbol = re.match('^[a-zA-Z0-9/]+$', target)
|
||||
if storage_type == 'dir' or storage_type == 'netfs':
|
||||
if not have_symbol:
|
||||
raise forms.ValidationError(_('The target must not contain any special characters'))
|
||||
if storage_type == 'dir':
|
||||
if storage_type == 'dir' or storage_type == 'netfs':
|
||||
if not target:
|
||||
raise forms.ValidationError(_('No path has been entered'))
|
||||
return target
|
||||
|
|
Loading…
Reference in a new issue