Skip to content

Commit

Permalink
(hotfix): base_manager_name should be 'objects'
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agilgur5 committed Aug 8, 2019
1 parent be4ac00 commit 8c0d571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_serializable_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SerializableModel(models.Model):
class Meta:
abstract = True
# when queried from a related Model, use this Manager
base_manager_name = 'SerializableManager'
base_manager_name = 'objects'

def serialize(self, *args, **kwargs):
"""
Expand Down

0 comments on commit 8c0d571

Please sign in to comment.