Explorar o código

Fixes #1113: Fixes server error when attempting to delete an image attachment

Jeremy Stretch %!s(int64=9) %!d(string=hai) anos
pai
achega
010f6c7f1a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/extras/views.py

+ 1 - 1
netbox/extras/views.py

@@ -27,4 +27,4 @@ class ImageAttachmentDeleteView(PermissionRequiredMixin, ObjectDeleteView):
     model = ImageAttachment
 
     def get_return_url(self, request, imageattachment):
-        return imageattachment.obj.get_absolute_url()
+        return imageattachment.parent.get_absolute_url()