Commit 07190c6d by Dudás Ádám

dashboard: do different stuff based on appliance type

parent 0ede81f1
...@@ -2160,7 +2160,10 @@ class DiskRemoveView(DeleteView): ...@@ -2160,7 +2160,10 @@ class DiskRemoveView(DeleteView):
disk = self.get_object() disk = self.get_object()
app = disk.get_appliance() app = disk.get_appliance()
if isinstance(app, Instance):
app.remove_disk(disk=disk, user=request.user) app.remove_disk(disk=disk, user=request.user)
else: # isinstance(app, InstanceTemplate)
app.disks.remove(disk)
disk.destroy() disk.destroy()
next_url = request.POST.get("next") next_url = request.POST.get("next")
......
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