Selaa lähdekoodia

forgot to return object in get_object() function

Miroslav Shubernetskiy 10 vuotta sitten
vanhempi
commit
52efdad4fb
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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