Skip to content

Commit

Permalink
Make annotate return instance of actual mockset class
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolás Fantone committed Sep 4, 2024
1 parent b8ac119 commit 58c7b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_mock_queries/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def annotate(self, **kwargs):
row._annotated_fields.append(key)
setattr(row, key, get_attribute(row, value)[0])

return MockSet(*results, clone=self)
return self._mockset_class()(*results, clone=self)

def aggregate(self, *args, **kwargs):
result = {}
Expand Down

0 comments on commit 58c7b33

Please sign in to comment.