Explorar o código

Fixed object return_url resolution for bulk editing

Jeremy Stretch %!s(int64=7) %!d(string=hai) anos
pai
achega
6ddbd79fe6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/utilities/views.py

+ 1 - 1
netbox/utilities/views.py

@@ -60,7 +60,7 @@ class GetReturnURLMixin(object):
             return query_param
 
         # Next, check if the object being modified (if any) has an absolute URL.
-        elif obj.pk and hasattr(obj, 'get_absolute_url'):
+        elif obj is not None and obj.pk and hasattr(obj, 'get_absolute_url'):
             return obj.get_absolute_url()
 
         # Fall back to the default URL (if specified) for the view.