Commit 8380e20d by Karsa Zoltán István

bugfix

parent b15a5b61
{% load crispy_forms_tags %}
{% load i18n %}
<p class="text-muted">
{% trans "Create datastore" %}
</p>
<form method="POST" action="{% url "dashboard.views.group-create" %}">
{% csrf_token %}
{% crispy form %}
</form>
\ No newline at end of file
......@@ -27,6 +27,7 @@
{% empty %}
{% trans "None" %}
{% endfor %}
<a href="" class="badge badge-primary"><i class="fa fa-plus"></i></a>
</div>
</div>
</div>
......
......@@ -430,7 +430,9 @@ class Disk(TimeStampedModel):
@classmethod
def __create(cls, user, datastore, params):
datastore = params.pop('datastore', DataStore.objects.filter(name=datastore).get())
if isinstance(datastore, str):
datastore = DataStore.objects.filter(name=datastore).get()
datastore = params.pop('datastore', datastore)
filename = params.pop('filename', str(uuid.uuid4()))
disk = cls(filename=filename, datastore=datastore, **params)
return disk
......
......@@ -880,6 +880,7 @@ class SaveAsTemplateOperation(InstanceOperation):
'max_ram_size': self.instance.max_ram_size,
'name': name or self._rename(self.instance.name),
'num_cores': self.instance.num_cores,
'num_cores_max': self.instance.num_cores_max,
'owner': user,
'parent': self.instance.template or None, # Can be problem
'priority': self.instance.priority,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment