Преглед на файлове

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