# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-05-11 12:07 from __future__ import unicode_literals from django.db import migrations from ishtar_common.utils_migrations import migrate_simple_image_to_m2m def migrate_image(apps, schema_editor): Find = apps.get_model('archaeological_finds', 'Find') IshtarImage = apps.get_model('ishtar_common', 'IshtarImage') FindImage = apps.get_model('archaeological_finds', 'FindImage') migrate_simple_image_to_m2m(Find, IshtarImage, FindImage) Treatment = apps.get_model('archaeological_finds', 'Treatment') IshtarImage = apps.get_model('ishtar_common', 'IshtarImage') TreatmentImage = apps.get_model('archaeological_finds', 'TreatmentImage') migrate_simple_image_to_m2m(Treatment, IshtarImage, TreatmentImage) class Migration(migrations.Migration): dependencies = [ ('archaeological_finds', '0024_auto_20180509_1742'), ] operations = [ migrations.RunPython(migrate_image), ]