diff options
-rw-r--r-- | patchwork/migrations/0027_remove_series_ordering.py | 19 | ||||
-rw-r--r-- | patchwork/models.py | 1 | ||||
-rw-r--r-- | patchwork/views/__init__.py | 3 |
3 files changed, 22 insertions, 1 deletions
diff --git a/patchwork/migrations/0027_remove_series_ordering.py b/patchwork/migrations/0027_remove_series_ordering.py new file mode 100644 index 0000000..6eec3a2 --- /dev/null +++ b/patchwork/migrations/0027_remove_series_ordering.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.15 on 2018-08-31 23:42 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('patchwork', '0026_add_user_bundles_backref'), + ] + + operations = [ + migrations.AlterModelOptions( + name='series', + options={'verbose_name_plural': 'Series'}, + ), + ] diff --git a/patchwork/models.py b/patchwork/models.py index 0409d4b..52e7a69 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -740,7 +740,6 @@ class Series(FilenameMixin, models.Model): return self.name if self.name else 'Untitled series #%d' % self.id class Meta: - ordering = ('date',) verbose_name_plural = 'Series' diff --git a/patchwork/views/__init__.py b/patchwork/views/__init__.py index a30b3a6..f66963f 100644 --- a/patchwork/views/__init__.py +++ b/patchwork/views/__init__.py @@ -286,6 +286,9 @@ def generic_list(request, project, view, view_args=None, filter_settings=None, # rendering the list template patches = patches.select_related('state', 'submitter', 'delegate') + patches = patches.only('state', 'submitter', 'delegate', 'project', + 'name', 'date') + # we also need checks and series patches = patches.prefetch_related('check_set', 'series') |