From 80903536b1f5828f764161cc5783c811a666aeba Mon Sep 17 00:00:00 2001 From: Greg Turner Date: Thu, 11 May 2017 16:14:02 +0700 Subject: [PATCH] Stop migrations being sensitive to `choices` changes. --- icekit_events/managers.py | 4 +++- .../migrations/0003_auto_20170511_1909.py | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py diff --git a/icekit_events/managers.py b/icekit_events/managers.py index dfcddf5..05cfc43 100644 --- a/icekit_events/managers.py +++ b/icekit_events/managers.py @@ -94,7 +94,9 @@ def _sort(x): # few days to avoid overflow) return make_aware(datetime.max-timedelta(2)) - return sorted(qs, key=_sort) + sorted_qs = sorted(qs, key=_sort) + + return sorted_qs EventManager = PublishingPolymorphicManager.from_queryset(EventQueryset) diff --git a/icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py b/icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py new file mode 100644 index 0000000..87571bd --- /dev/null +++ b/icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +from icekit.plugins.links import appsettings + + +class Migration(migrations.Migration): + + dependencies = [ + ('icekit_events_links', '0002_auto_20170314_1401'), + ] + + operations = [ + migrations.AlterField( + model_name='eventlink', + name='style', + field=models.CharField(choices=appsettings.RELATION_STYLE_CHOICES, max_length=255, verbose_name=b'Link style', blank=True), + ), + ]