소스 검색

Fixed object return_url resolution for bulk editing

Jeremy Stretch 7 년 전
부모
커밋
6ddbd79fe6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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.