瀏覽代碼

forgot to return object in get_object() function

Miroslav Shubernetskiy 10 年之前
父節點
當前提交
52efdad4fb
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      rest_framework_bulk/drf2/mixins.py
  2. 1 1
      rest_framework_bulk/drf3/mixins.py

+ 1 - 1
rest_framework_bulk/drf2/mixins.py

@@ -51,7 +51,7 @@ class BulkUpdateModelMixin(object):
 
     def get_object(self):
         try:
-            super(BulkUpdateModelMixin, self).get_object()
+            return super(BulkUpdateModelMixin, self).get_object()
         except ImproperlyConfigured:
             # probably happened when called get_object() within metadata()
             # which is not allowed on list viewset however since we are enabling

+ 1 - 1
rest_framework_bulk/drf3/mixins.py

@@ -47,7 +47,7 @@ class BulkUpdateModelMixin(object):
 
     def get_object(self):
         try:
-            super(BulkUpdateModelMixin, self).get_object()
+            return super(BulkUpdateModelMixin, self).get_object()
         except AssertionError:
             # probably happened when called get_object() within options()
             # via self.metadata_class which is not allowed on list viewset