From af84a0ee01bfdef599508ad9a29cb3b269992bdf Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Wed, 31 Jul 2024 11:14:19 +0200 Subject: [PATCH] Add return type --- server/vbv_lernwelt/dashboard/person_export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/vbv_lernwelt/dashboard/person_export.py b/server/vbv_lernwelt/dashboard/person_export.py index dacd4272..0a0d76aa 100644 --- a/server/vbv_lernwelt/dashboard/person_export.py +++ b/server/vbv_lernwelt/dashboard/person_export.py @@ -1,4 +1,5 @@ from io import BytesIO +from typing import Optional import structlog from django.utils.translation import gettext_lazy as _ @@ -22,8 +23,8 @@ def export_persons( user: User, course_session_ids: list[str], save_as_file: bool = False, -): - if len(course_session_ids) == 0: +) -> Optional[bytes]: + if not course_session_ids: return wb = Workbook()