From d6abeb1ce8d284e387c1637bae2ef911c707f6aa Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Dec 2014 19:52:03 +0100 Subject: Fix length of town's name. * Ready for Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch! --- .../migrations/0010_responsible_town_planning_service_transition.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archaeological_files/migrations') diff --git a/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py b/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py index 4d46518dc..80771c562 100644 --- a/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py +++ b/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py @@ -7,7 +7,10 @@ from django.db import models class Migration(DataMigration): default_name = u"Chef de service" def forwards(self, orm): - DEFAULT_PERSON = orm['auth.User'].objects.order_by('pk').all()[0] + try: + DEFAULT_PERSON = orm['auth.User'].objects.order_by('pk').all()[0] + except: + return created, reused = 0, 0 try: person_type = orm['ishtar_common.PersonType'].objects.get( -- cgit v1.2.3