summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-02-09 16:24:13 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-02-10 09:56:22 +0100
commitb0c62ac1f87fca04c10b57a54e626e0195f61967 (patch)
tree71f2c30136d533ffbf4b4d506a2f6e8c3095d5b2 /ishtar_common
parent3a2b8e184fcdbaf6cd438da8bd2733c607e97cb6 (diff)
downloadIshtar-b0c62ac1f87fca04c10b57a54e626e0195f61967.tar.bz2
Ishtar-b0c62ac1f87fca04c10b57a54e626e0195f61967.zip
✨ importer column: concat_str up to 50
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/fixtures/initial_importtypes-fr.json40
-rw-r--r--ishtar_common/fixtures/initial_importtypes-tests-fr.json72
-rw-r--r--ishtar_common/migrations/0275_importerduplicatefield_concat_str.py23
-rw-r--r--ishtar_common/models_imports.py8
4 files changed, 83 insertions, 60 deletions
diff --git a/ishtar_common/fixtures/initial_importtypes-fr.json b/ishtar_common/fixtures/initial_importtypes-fr.json
index 5f88400b0..c18e71284 100644
--- a/ishtar_common/fixtures/initial_importtypes-fr.json
+++ b/ishtar_common/fixtures/initial_importtypes-fr.json
@@ -3938,7 +3938,7 @@
"field_name": "base_finds__context_record__external_id",
"force_new": false,
"concat": true,
- "concat_str": null
+ "concat_str": ""
}
},
{
@@ -3951,7 +3951,7 @@
"field_name": "base_finds__external_id",
"force_new": false,
"concat": true,
- "concat_str": null
+ "concat_str": ""
}
},
{
@@ -3964,7 +3964,7 @@
"field_name": "external_id",
"force_new": false,
"concat": true,
- "concat_str": null
+ "concat_str": ""
}
},
{
@@ -4232,7 +4232,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -5524,7 +5524,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -6341,7 +6341,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -6550,7 +6550,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -6569,7 +6569,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -6588,7 +6588,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -6626,7 +6626,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7196,7 +7196,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7215,7 +7215,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7234,7 +7234,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7253,7 +7253,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7272,7 +7272,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7291,7 +7291,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7310,7 +7310,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7329,7 +7329,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7348,7 +7348,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -7367,7 +7367,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
}
diff --git a/ishtar_common/fixtures/initial_importtypes-tests-fr.json b/ishtar_common/fixtures/initial_importtypes-tests-fr.json
index 0123f7223..cdaa5255b 100644
--- a/ishtar_common/fixtures/initial_importtypes-tests-fr.json
+++ b/ishtar_common/fixtures/initial_importtypes-tests-fr.json
@@ -725,7 +725,7 @@
"field_name": "label",
"force_new": false,
"concat": false,
- "concat_str": null
+ "concat_str": ""
}
},
{
@@ -751,7 +751,7 @@
"field_name": "scientist__name",
"force_new": false,
"concat": false,
- "concat_str": null
+ "concat_str": ""
}
},
{
@@ -977,7 +977,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -996,7 +996,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1015,7 +1015,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1034,7 +1034,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1053,7 +1053,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1072,7 +1072,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1091,7 +1091,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1110,7 +1110,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1148,7 +1148,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1167,7 +1167,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1205,7 +1205,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1224,7 +1224,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1243,7 +1243,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1262,7 +1262,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1281,7 +1281,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1300,7 +1300,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1338,7 +1338,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1357,7 +1357,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1395,7 +1395,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1414,7 +1414,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1433,7 +1433,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1452,7 +1452,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1471,7 +1471,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1509,7 +1509,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1528,7 +1528,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1566,7 +1566,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1585,7 +1585,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1604,7 +1604,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1623,7 +1623,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1642,7 +1642,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1661,7 +1661,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1699,7 +1699,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1718,7 +1718,7 @@
],
"force_new": false,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
@@ -1794,7 +1794,7 @@
],
"force_new": true,
"concat": false,
- "concat_str": null,
+ "concat_str": "",
"comment": ""
}
},
diff --git a/ishtar_common/migrations/0275_importerduplicatefield_concat_str.py b/ishtar_common/migrations/0275_importerduplicatefield_concat_str.py
new file mode 100644
index 000000000..be535d629
--- /dev/null
+++ b/ishtar_common/migrations/0275_importerduplicatefield_concat_str.py
@@ -0,0 +1,23 @@
+# Generated by Django 4.2.19 on 2026-02-09 15:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('ishtar_common', '0274_import_gis_options'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='importerduplicatefield',
+ name='concat_str',
+ field=models.CharField(blank=True, default='', max_length=50, verbose_name='Concatenate character'),
+ ),
+ migrations.AlterField(
+ model_name='importtarget',
+ name='concat_str',
+ field=models.CharField(blank=True, default='', max_length=50, verbose_name='Concatenate character'),
+ ),
+ ]
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py
index b13267937..6db0e1d1d 100644
--- a/ishtar_common/models_imports.py
+++ b/ishtar_common/models_imports.py
@@ -932,11 +932,11 @@ class ImporterDuplicateField(models.Model):
field_name = models.CharField(
_("Field name"), blank=True, null=True, max_length=200
)
- force_new = models.BooleanField(_("Force creation of new items"), default=False)
concat = models.BooleanField(_("Concatenate with existing"), default=False)
concat_str = models.CharField(
- _("Concatenate character"), max_length=5, blank=True, null=True
+ _("Concatenate character"), max_length=50, blank=True, default=""
)
+ force_new = models.BooleanField(_("Force creation of new items"), default=False)
objects = ImporterDuplicateFieldManager()
class Meta:
@@ -1039,11 +1039,11 @@ class ImportTarget(models.Model):
formater_type = models.ForeignKey(
"FormaterType", related_name="targets", on_delete=models.CASCADE
)
- force_new = models.BooleanField(_("Force creation of new items"), default=False)
concat = models.BooleanField(_("Concatenate with existing"), default=False)
concat_str = models.CharField(
- _("Concatenate character"), max_length=5, blank=True, null=True
+ _("Concatenate character"), max_length=50, blank=True, default=""
)
+ force_new = models.BooleanField(_("Force creation of new items"), default=False)
comment = models.TextField(_("Comment"), blank=True, null=True)
objects = ImportTargetManager()