- if (not len(self.query.extra)) and (not len(self.query.aggregates)):
- return LazyQueryList(self.model, list(self.values_list('id', flat=True)))
+ if not len(self.query.aggregates):
+ values_list = ['id']
+
+ if len(self.query.extra):
+ extra_keys = self.query.extra.keys()
+ values_list += extra_keys
+
+ return LazyQueryList(self.model, list(self.values_list(*values_list)))