Skip to content
Snippets Groups Projects
Verified Commit f2eb713f authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Reformat

parent 3067565b
No related branches found
No related tags found
1 merge request!121Prepare release 3.0
include: include:
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/general.yml file: /ci/general.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/prepare/lock.yml file: /ci/prepare/lock.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/test/lint.yml file: /ci/test/lint.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/test/test.yml file: /ci/test/test.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/test/security.yml file: /ci/test/security.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/build/dist.yml file: /ci/build/dist.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/build/docs.yml file: /ci/build/docs.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: "/ci/deploy/trigger_dist.yml" file: "/ci/deploy/trigger_dist.yml"
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/publish/pypi.yml file: /ci/publish/pypi.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/deploy/pages.yml file: /ci/deploy/pages.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/docker/image.yml file: /ci/docker/image.yml
pedasos_teachers: pedasos_teachers:
model: core.Person model: core.Person
verbose_name: 'Pedasos: Teachers' verbose_name: "Pedasos: Teachers"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -15,7 +15,7 @@ pedasos_teachers: ...@@ -15,7 +15,7 @@ pedasos_teachers:
- ignore - ignore
pedasos_classes: pedasos_classes:
model: core.Group model: core.Group
verbose_name: 'Pedasos: Classes' verbose_name: "Pedasos: Classes"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -26,7 +26,7 @@ pedasos_classes: ...@@ -26,7 +26,7 @@ pedasos_classes:
- group_owner_short_name - group_owner_short_name
pedasos_courses: pedasos_courses:
model: core.Group model: core.Group
verbose_name: 'Pedasos: Courses' verbose_name: "Pedasos: Courses"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -38,7 +38,7 @@ pedasos_courses: ...@@ -38,7 +38,7 @@ pedasos_courses:
- group_owner_short_name - group_owner_short_name
pedasos_students: pedasos_students:
model: core.Person model: core.Person
verbose_name: 'Pedasos: Students' verbose_name: "Pedasos: Students"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -84,7 +84,7 @@ pedasos_students: ...@@ -84,7 +84,7 @@ pedasos_students:
- group_membership_short_name - group_membership_short_name
pedasos_guardians_1: pedasos_guardians_1:
model: core.Person model: core.Person
verbose_name: 'Pedasos: Guardians 1' verbose_name: "Pedasos: Guardians 1"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -130,7 +130,7 @@ pedasos_guardians_1: ...@@ -130,7 +130,7 @@ pedasos_guardians_1:
- ignore - ignore
pedasos_guardians_2: pedasos_guardians_2:
model: core.Person model: core.Person
verbose_name: 'Pedasos: Guardians 2' verbose_name: "Pedasos: Guardians 2"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: "\t" separator: "\t"
...@@ -176,7 +176,7 @@ pedasos_guardians_2: ...@@ -176,7 +176,7 @@ pedasos_guardians_2:
- ignore - ignore
schild_nrw_students: schild_nrw_students:
model: core.Person model: core.Person
verbose_name: 'Schild-NRW: Students' verbose_name: "Schild-NRW: Students"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: ; separator: ;
...@@ -208,7 +208,7 @@ schild_nrw_students: ...@@ -208,7 +208,7 @@ schild_nrw_students:
- phone_number - phone_number
schild_nrw_teachers: schild_nrw_teachers:
model: core.Person model: core.Person
verbose_name: 'Schild-NRW: Teachers' verbose_name: "Schild-NRW: Teachers"
extra_args: extra_args:
has_header_row: true has_header_row: true
separator: ; separator: ;
......
export default { export default {
name: "csv", name: "csv",
path: "#", path: "#",
component: () => import("aleksis.core/components/Parent.vue"), component: () => import("aleksis.core/components/Parent.vue"),
meta: { meta: {
inMenu: true,
titleKey: "csv.menu_title",
icon: "mdi-swap-vertical",
permission: "csv_import.view_csv_menu_rule",
},
children: [
{
path: "import/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "csv.csvImport",
meta: {
inMenu: true, inMenu: true,
titleKey: "csv.menu_title", titleKey: "csv.import.menu_title",
icon: "mdi-swap-vertical", icon: "mdi-table-arrow-left",
permission: "csv_import.view_csv_menu_rule", permission: "csv_import.import_data_rule",
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
}, },
children: [ {
{ path: "templates/",
path: "import/", component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"), name: "csv.importTemplates",
name: "csv.csvImport", meta: {
meta: { inMenu: true,
inMenu: true, titleKey: "csv.import_template.menu_title",
titleKey: "csv.import.menu_title", icon: "mdi-table-cog",
icon: "mdi-table-arrow-left", permission: "csv_import.view_importtemplate_rule",
permission: "csv_import.import_data_rule", },
}, props: {
props: { byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true, },
}, },
}, {
{ path: "templates/upload/",
path: "templates/", component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"), name: "csv.uploadImportTemplate",
name: "csv.importTemplates", props: {
meta: { byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
inMenu: true, },
titleKey: "csv.import_template.menu_title", },
icon: "mdi-table-cog", ],
permission: "csv_import.view_importtemplate_rule" };
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "templates/upload/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "csv.uploadImportTemplate",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
]
}
{ {
"csv": { "csv": {
"menu_title": "CSV-Import", "menu_title": "CSV-Import",
"import": { "import": {
"menu_title": "CSV-Datei importieren" "menu_title": "CSV-Datei importieren"
}, },
"import_template": { "import_template": {
"menu_title": "Import-Vorlagen" "menu_title": "Import-Vorlagen"
}
} }
}
} }
{ {
"csv": { "csv": {
"menu_title": "CSV Import", "menu_title": "CSV Import",
"import": { "import": {
"menu_title": "Import CSV File" "menu_title": "Import CSV File"
}, },
"import_template": { "import_template": {
"menu_title": "Import Templates" "menu_title": "Import Templates"
}
} }
}
} }
{ {
"csv": { "csv": {
"import": { "import": {
"menu_title": "Импорт файла CSV" "menu_title": "Импорт файла CSV"
}, },
"import_template": { "import_template": {
"menu_title": "Импортировать шаблоны" "menu_title": "Импортировать шаблоны"
}, },
"menu_title": "Импорт CSV" "menu_title": "Импорт CSV"
} }
} }
{ {
"csv": { "csv": {
"menu_title": "Імпорт CSV", "menu_title": "Імпорт CSV",
"import_template": { "import_template": {
"menu_title": "Імпортувати шаблони" "menu_title": "Імпортувати шаблони"
}, },
"import": { "import": {
"menu_title": "Імпорт файлу CSV" "menu_title": "Імпорт файлу CSV"
}
} }
}
} }
...@@ -14,5 +14,7 @@ upload_importtemplate_predicate = has_person & ( ...@@ -14,5 +14,7 @@ upload_importtemplate_predicate = has_person & (
) )
add_perm("csv_import.upload_importtemplate_rule", upload_importtemplate_predicate) add_perm("csv_import.upload_importtemplate_rule", upload_importtemplate_predicate)
view_csv_menu_predicate = import_data_predicate | view_importtemplate_predicate | upload_importtemplate_predicate view_csv_menu_predicate = (
import_data_predicate | view_importtemplate_predicate | upload_importtemplate_predicate
)
add_perm("csv_import.view_csv_menu_rule", view_csv_menu_predicate) add_perm("csv_import.view_csv_menu_rule", view_csv_menu_predicate)
...@@ -169,7 +169,10 @@ def import_csv( ...@@ -169,7 +169,10 @@ def import_csv(
# Determine available fields for finding existing instances # Determine available fields for finding existing instances
get_dict = {} get_dict = {}
match_field_priority = 0 match_field_priority = 0
for (column_name, field_type,) in sorted( for (
column_name,
field_type,
) in sorted(
filter(lambda f: isinstance(f[1], MatchFieldType), field_types.items()), filter(lambda f: isinstance(f[1], MatchFieldType), field_types.items()),
key=lambda f: f[1].priority, key=lambda f: f[1].priority,
): ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment