Skip to content
Snippets Groups Projects
Commit 2011793a authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Add tooltips in alsijil_helpers.py

parent a95d775a
No related branches found
No related tags found
1 merge request!49Resolve "Add rules and permissions"
Pipeline #2745 passed
......@@ -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"):
......
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