Commit 8eb07036 by Bach Dániel

Merge branch 'issue-351' into 'master'

Issue 351

See merge request !263
parents 72e1a7ba 7cb65f1c
......@@ -769,8 +769,13 @@ class SaveAsTemplateOperation(InstanceOperation):
tmpl = InstanceTemplate(**params)
tmpl.full_clean() # Avoiding database errors.
tmpl.save()
# Copy traits from the VM instance
tmpl.req_traits.add(*self.instance.req_traits.all())
if clone:
tmpl.clone_acl(self.instance.template)
# Add permission for the original owner of the template
tmpl.set_level(self.instance.template.owner, 'owner')
tmpl.set_level(user, 'owner')
try:
tmpl.disks.add(*self.disks)
# create interface templates
......
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