mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
add warning for dublicate instance name on other host
This commit is contained in:
parent
d75df231a8
commit
e1910c75ff
1 changed files with 2 additions and 0 deletions
|
@ -99,6 +99,8 @@ def create_instance(request, compute_id):
|
||||||
if data['name'] in instances:
|
if data['name'] in instances:
|
||||||
msg = _("A virtual machine with this name already exists")
|
msg = _("A virtual machine with this name already exists")
|
||||||
error_messages.append(msg)
|
error_messages.append(msg)
|
||||||
|
if Instance.objects.filter(name__exact=data['name']):
|
||||||
|
messages.warning(request,_("There is an instance with same name. Are you sure?"))
|
||||||
if not error_messages:
|
if not error_messages:
|
||||||
if data['hdd_size']:
|
if data['hdd_size']:
|
||||||
if not data['mac']:
|
if not data['mac']:
|
||||||
|
|
Loading…
Reference in a new issue