From 2011793a5b3c0e130e97e349b5b474b7466d29e4 Mon Sep 17 00:00:00 2001 From: Hangzhi Yu <hangzhi@protonmail.com> Date: Wed, 17 Jun 2020 23:03:17 +0200 Subject: [PATCH] Add tooltips in alsijil_helpers.py --- aleksis/apps/alsijil/util/alsijil_helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aleksis/apps/alsijil/util/alsijil_helpers.py b/aleksis/apps/alsijil/util/alsijil_helpers.py index f1c1f4a3f..dcb2bbf1f 100644 --- a/aleksis/apps/alsijil/util/alsijil_helpers.py +++ b/aleksis/apps/alsijil/util/alsijil_helpers.py @@ -18,6 +18,7 @@ def get_lesson_period_by_pk( week: Optional[int] = None, period_id: Optional[int] = None, ): + """Get LessonPeriod object either by given object_id or by time and current person.""" if period_id: lesson_period = LessonPeriod.objects.get(pk=period_id) elif hasattr(request, "user") and hasattr(request.user, "person"): @@ -37,6 +38,7 @@ def get_instance_by_pk( type_: Optional[str] = None, id_: Optional[int] = None, ): + """Get Instance object by given type and id or the current person.""" if type_ and id_: return get_el_by_pk(request, type_, id_) elif hasattr(request, "user") and hasattr(request.user, "person"): -- GitLab