summaryrefslogtreecommitdiff
path: root/ishtar_common/serializers_utils.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-09-07 18:42:55 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:38:32 +0200
commita9c7a217383ead98acc4fd55d635c58f1aad9c26 (patch)
tree764f7d40f7945e4d1c98c1c322cb895a12a83288 /ishtar_common/serializers_utils.py
parent8cbda24660d1dbf50980e1f77c5c12a27e0279f5 (diff)
downloadIshtar-a9c7a217383ead98acc4fd55d635c58f1aad9c26.tar.bz2
Ishtar-a9c7a217383ead98acc4fd55d635c58f1aad9c26.zip
✨ Admin - Importers groups: JSON export, adapt JSON export of importer types
Diffstat (limited to 'ishtar_common/serializers_utils.py')
-rw-r--r--ishtar_common/serializers_utils.py57
1 files changed, 48 insertions, 9 deletions
diff --git a/ishtar_common/serializers_utils.py b/ishtar_common/serializers_utils.py
index eefbfd681..ada0a62cf 100644
--- a/ishtar_common/serializers_utils.py
+++ b/ishtar_common/serializers_utils.py
@@ -115,20 +115,59 @@ def archive_serialization(
GENERIC_QUERYSET_FILTER = {
"JsonDataSection": {"JsonDataField": "json_data_field__pk__in"},
- "Regexp": {"ImporterType": "columns__importer_type__pk__in"},
+ "Regexp": {
+ "ImporterType": "columns__importer_type__pk__in",
+ "ImporterGroup": "columns__importer_type__groups__group__pk__in",
+ },
"ImporterModel": {
"ImporterType": [
"importer_type_associated__pk__in",
"importer_type_created__pk__in",
- ]
+ ],
+ "ImporterGroup": [
+ "importer_type_associated__groups__group__pk__in",
+ "importer_type_created__groups__group__pk__in",
+ ],
+ },
+ "ValueFormater": {
+ "ImporterType": "columns__importer_type__pk__in",
+ "ImporterGroup": "columns__importer_type__groups__group__pk__in",
+ },
+ "ImporterColumn": {
+ "ImporterType": "importer_type__pk__in",
+ "ImporterGroup": "importer_type__groups__group__pk__in",
+ },
+ "ImporterDefault": {
+ "ImporterType": "importer_type__pk__in",
+ "ImporterGroup": "importer_type__groups__group__pk__in",
+ },
+ "ImportTarget": {
+ "ImporterType": "column__importer_type__pk__in",
+ "ImporterGroup": "column__importer_type__groups__group__pk__in",
},
- "ValueFormater": {"ImporterType": "columns__importer_type__pk__in"},
- "ImporterColumn": {"ImporterType": "importer_type__pk__in"},
- "ImporterDefault": {"ImporterType": "importer_type__pk__in"},
- "ImportTarget": {"ImporterType": "column__importer_type__pk__in"},
- "FormaterType": {"ImporterType": "targets__column__importer_type__pk__in"},
- "ImporterDefaultValues": {"ImporterType": "default_target__importer_type__pk__in"},
- "ImporterDuplicateField": {"ImporterType": "column__importer_type__pk__in"},
+ "FormaterType": {
+ "ImporterType": "targets__column__importer_type__pk__in",
+ "ImporterGroup": "targets__column__importer_type__groups__group__pk__in",
+ },
+ "ImporterDefaultValues": {
+ "ImporterType": "default_target__importer_type__pk__in",
+ "ImporterGroup": "default_target__importer_type__groups__group__pk__in",
+ },
+ "ImporterDuplicateField": {
+ "ImporterType": "column__importer_type__pk__in",
+ "ImporterGroup": "column__importer_type__groups__group__pk__in",
+ },
+ "ImporterGroup": {
+ "ImporterType": "importer_types__importer_type__pk__in",
+ "ImporterGroup": "importer_types__importer_type__groups__group__pk__in",
+ },
+ "ImporterGroupImporter": {
+ "ImporterType": "importer_type__pk__in",
+ "ImporterGroup": "group__pk__in",
+ },
+ "ImporterType": {
+ "ImporterGroup": "groups__group__pk__in",
+ }
}