mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fixed deprecated references to ImageAttachment.obj
This commit is contained in:
parent
51725d3d9c
commit
36c31a21b9
@ -15,11 +15,11 @@ class ImageAttachmentEditView(PermissionRequiredMixin, ObjectEditView):
|
||||
if not imageattachment.pk:
|
||||
# Assign the parent object based on URL kwargs
|
||||
model = kwargs.get('model')
|
||||
imageattachment.obj = get_object_or_404(model, pk=kwargs['object_id'])
|
||||
imageattachment.parent = get_object_or_404(model, pk=kwargs['object_id'])
|
||||
return imageattachment
|
||||
|
||||
def get_return_url(self, imageattachment):
|
||||
return imageattachment.obj.get_absolute_url()
|
||||
return imageattachment.parent.get_absolute_url()
|
||||
|
||||
|
||||
class ImageAttachmentDeleteView(PermissionRequiredMixin, ObjectDeleteView):
|
||||
|
Loading…
Reference in New Issue
Block a user