From 0babc78d634a013478e7cd951eef126080542a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Thu, 25 Jun 2015 18:21:58 +0200 Subject: [PATCH] Fixed breaking change in migration --- amiibofindr/apps/amiibo/migrations/0017_auto_20150625_1806.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amiibofindr/apps/amiibo/migrations/0017_auto_20150625_1806.py b/amiibofindr/apps/amiibo/migrations/0017_auto_20150625_1806.py index 69b6710..76da327 100644 --- a/amiibofindr/apps/amiibo/migrations/0017_auto_20150625_1806.py +++ b/amiibofindr/apps/amiibo/migrations/0017_auto_20150625_1806.py @@ -13,7 +13,7 @@ import amiibofindr.apps.amiibo.models def update_images(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the historical version. - Person = apps.get_model("amiibo", "Amiibo") + Amiibo = apps.get_model("amiibo", "Amiibo") for amiibo in Amiibo.objects.all(): amiibo.statue = File(open(os.path.join(settings.MEDIA_ROOT, 'amiibos', amiibo.collection.slug, '{}.png'.format(amiibo.slug)))) amiibo.save()