Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Stop migrations being sensitive to choices changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Turner committed May 11, 2017
1 parent ef0d203 commit 8090353
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion icekit_events/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions icekit_events/plugins/links/migrations/0003_auto_20170511_1909.py
Original file line number Diff line number Diff line change
@@ -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),
),
]

0 comments on commit 8090353

Please sign in to comment.