From ba29a23a936a5ce926e65af2df8427c1d8d643c8 Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Mon, 9 Dec 2024 11:50:40 +0100 Subject: [PATCH] fix(test): remove dependency to s3 --- .../migrations/0002_auto_20230224_1314.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/diagnostic_word/migrations/0002_auto_20230224_1314.py b/diagnostic_word/migrations/0002_auto_20230224_1314.py index 6e4e1c5b8..cf41be95a 100644 --- a/diagnostic_word/migrations/0002_auto_20230224_1314.py +++ b/diagnostic_word/migrations/0002_auto_20230224_1314.py @@ -1,26 +1,6 @@ # Generated by Django 3.2.18 on 2023-02-24 13:14 - -from typing import Callable - from django.db import migrations -from config.storages import DefaultStorage - - -def forwards(apps, schema_editor): - WordTemplate: Callable = apps.get_model("diagnostic_word", "WordTemplate") # type: ignore - WordTemplate.objects.create( - slug="template-bilan-1", - description="Modèle Word pour générer le diagnostic téléchargeable", - filename_mask="{diagnostic_name} - {start_date} à {end_date} - issu de SPARTE.docx", - docx=DefaultStorage().open("word_templates/Modèle_de_portrait_v17.docx"), - ) - - -def backwards(apps, schema_editor): - WordTemplate: Callable = apps.get_model("diagnostic_word", "WordTemplate") # type: ignore - WordTemplate.objects.filter(slug="template-bilan-1").delete() - class Migration(migrations.Migration): dependencies = [ @@ -28,7 +8,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(forwards, reverse_code=backwards), migrations.RunSQL( "DROP TABLE IF EXISTS django_docx_template_docxtemplate;", reverse_sql=migrations.RunSQL.noop,