From 87273de7954d8ed05bc2dbf1a17e69ae6a3447f1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 10 Jul 2016 14:00:01 +0000 Subject: [PATCH] Not all the IETF 96 room names are in place yet. Use get_or_create in the data migration. - Legacy-Id: 11591 --- ietf/meeting/migrations/0026_add_floorplan_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/meeting/migrations/0026_add_floorplan_data.py b/ietf/meeting/migrations/0026_add_floorplan_data.py index ef9cb13a9..9f193f6a0 100644 --- a/ietf/meeting/migrations/0026_add_floorplan_data.py +++ b/ietf/meeting/migrations/0026_add_floorplan_data.py @@ -52,7 +52,7 @@ def forward(apps, schema_editor): for item in rooms: name, floor_id, x1, y1, x2, y2 = item try: - room = Room.objects.get(name=name, meeting=meeting) + room, created = Room.objects.get_or_create(name=name, meeting=meeting) room.floorplan_id = floor_id room.x1 = x1 room.y1 = y1