From 5d975efdb36f5f238bfe586497abd19d6d52617a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Sep 2024 15:42:48 +0200 Subject: 🗃️ archaeological files: new fields in database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Monitoring justification type - Development type --- .../migrations/0119_default_typos.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/migrations/0119_default_typos.py b/archaeological_context_records/migrations/0119_default_typos.py index 10cdab665..bdfa927ca 100644 --- a/archaeological_context_records/migrations/0119_default_typos.py +++ b/archaeological_context_records/migrations/0119_default_typos.py @@ -3,13 +3,12 @@ from django.db import migrations from ishtar_common.utils import migrations_load_data -COLOR_WARNING = "\033[93m" -COLOR_ENDC = "\033[0m" - -def load_data(_, __): - migrations_load_data("archaeological_context_records", - "0119_default_typos.json") +def load_data(apps, __): + StructureType = apps.get_model("archaeological_context_records", "structuretype") + if not StructureType.objects.count(): + migrations_load_data("archaeological_context_records", + "0119_default_typos.json") class Migration(migrations.Migration): -- cgit v1.2.3