Add return type

This commit is contained in:
Christian Cueni 2024-07-31 11:14:19 +02:00
parent 46760cf8ae
commit af84a0ee01
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from io import BytesIO from io import BytesIO
from typing import Optional
import structlog import structlog
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -22,8 +23,8 @@ def export_persons(
user: User, user: User,
course_session_ids: list[str], course_session_ids: list[str],
save_as_file: bool = False, save_as_file: bool = False,
): ) -> Optional[bytes]:
if len(course_session_ids) == 0: if not course_session_ids:
return return
wb = Workbook() wb = Workbook()