Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
2011793a
Commit
2011793a
authored
4 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Add tooltips in alsijil_helpers.py
parent
a95d775a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!49
Resolve "Add rules and permissions"
Pipeline
#2745
passed
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/util/alsijil_helpers.py
+2
-0
2 additions, 0 deletions
aleksis/apps/alsijil/util/alsijil_helpers.py
with
2 additions
and
0 deletions
aleksis/apps/alsijil/util/alsijil_helpers.py
+
2
−
0
View file @
2011793a
...
...
@@ -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
"
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment