Fix importer in default prepare_server
This commit is contained in:
parent
9f8686e592
commit
f155ceb26b
|
|
@ -69,7 +69,7 @@ const getNextStepLink = (courseSession: CourseSession) => {
|
||||||
<DueDatesList
|
<DueDatesList
|
||||||
class="bg-white p-6"
|
class="bg-white p-6"
|
||||||
:due-dates="allDueDates"
|
:due-dates="allDueDates"
|
||||||
:max-count="10"
|
:max-count="13"
|
||||||
:show-top-border="false"
|
:show-top-border="false"
|
||||||
></DueDatesList>
|
></DueDatesList>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,14 @@ def create_or_update_user(
|
||||||
|
|
||||||
|
|
||||||
def import_course_sessions_from_excel(
|
def import_course_sessions_from_excel(
|
||||||
filename: str, course: Course = None, restrict_language=None
|
filename: str, course: Course = None, restrict_language=None, circle_keys=None
|
||||||
):
|
):
|
||||||
|
if circle_keys is None:
|
||||||
|
circle_keys = [
|
||||||
|
"Kickoff",
|
||||||
|
"Basis",
|
||||||
|
"Fahrzeug",
|
||||||
|
]
|
||||||
workbook = load_workbook(filename=filename)
|
workbook = load_workbook(filename=filename)
|
||||||
sheet = workbook["Schulungen Durchführung"]
|
sheet = workbook["Schulungen Durchführung"]
|
||||||
no_course = course is None
|
no_course = course is None
|
||||||
|
|
@ -286,13 +292,7 @@ def import_course_sessions_from_excel(
|
||||||
course,
|
course,
|
||||||
data,
|
data,
|
||||||
language,
|
language,
|
||||||
circle_keys=[
|
circle_keys=circle_keys,
|
||||||
"Kickoff",
|
|
||||||
"Basis",
|
|
||||||
"Fahrzeug",
|
|
||||||
"Haushalt Teil 1",
|
|
||||||
"Haushalt Teil 2",
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,13 @@ def coursesessions_trainers_import(request):
|
||||||
def import_training_and_trainer(excel_file: str):
|
def import_training_and_trainer(excel_file: str):
|
||||||
import_course_sessions_from_excel(
|
import_course_sessions_from_excel(
|
||||||
excel_file,
|
excel_file,
|
||||||
|
circle_keys=[
|
||||||
|
"Kickoff",
|
||||||
|
"Basis",
|
||||||
|
"Fahrzeug",
|
||||||
|
"Haushalt Teil 1",
|
||||||
|
"Haushalt Teil 2",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
import_trainers_from_excel_for_training(excel_file)
|
import_trainers_from_excel_for_training(excel_file)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue