Skip to content

Commit 8c0d571

Browse files
committed
(hotfix): base_manager_name should be 'objects'
- the Django docs for 1.10+ on this don't give an example, so I ended up incorrectly adding the name of the manager class, but they're actually looking for the name of the attribute in the class that contains the instance of the manager 😅 - see https://stackoverflow.com/a/48124863/3431180 for an example - see #4 for discussion / bug report
1 parent be4ac00 commit 8c0d571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_serializable_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class SerializableModel(models.Model):
4747
class Meta:
4848
abstract = True
4949
# when queried from a related Model, use this Manager
50-
base_manager_name = 'SerializableManager'
50+
base_manager_name = 'objects'
5151

5252
def serialize(self, *args, **kwargs):
5353
"""

0 commit comments

Comments
 (0)