Skip to content

Commit

Permalink
chore: Move selects_all
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed May 4, 2022
1 parent defc37c commit 89be420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modeltranslation/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ def raw_values(self, *fields):
return super(MultilingualQuerySet, self).values(*fields)

def _values(self, *original, **kwargs):
selects_all = kwargs.pop('selects_all', False)
if not kwargs.pop('prepare', False):
return super(MultilingualQuerySet, self)._values(*original, **kwargs)
selects_all = kwargs.pop('selects_all', False)
new_fields, translation_fields = append_fallback(self.model, original)
annotation_keys = set(self.query.annotation_select.keys()) if selects_all else set()
new_fields.update(annotation_keys)
Expand Down

0 comments on commit 89be420

Please sign in to comment.