mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-26 21:14:01 +00:00
chore: Move selects_all
This commit is contained in:
parent
defc37c7a5
commit
89be420540
1 changed files with 1 additions and 1 deletions
|
|
@ -412,9 +412,9 @@ class MultilingualQuerySet(models.query.QuerySet):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue