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
e77bf9f4
Commit
e77bf9f4
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix queries for dates with generate_list_of_all_register_objects
parent
50a89067
No related branches found
No related tags found
1 merge request
!185
Fix queries for dates with generate_list_of_all_register_objects
Pipeline
#10122
passed with warnings
3 years ago
Stage: test
Stage: build
Stage: publish
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/util/alsijil_helpers.py
+4
-2
4 additions, 2 deletions
aleksis/apps/alsijil/util/alsijil_helpers.py
with
4 additions
and
2 deletions
aleksis/apps/alsijil/util/alsijil_helpers.py
+
4
−
2
View file @
e77bf9f4
...
...
@@ -168,8 +168,9 @@ def _generate_dicts_for_lesson_periods(
"""
Generate a list of dicts for use with ``RegisterObjectTable``.
"""
if
not
holiday_days
:
holiday_days
=
[]
date_start
=
lesson_periods
.
first
().
lesson
.
validity
.
date_start
date_end
=
lesson_periods
.
last
().
lesson
.
validity
.
date_end
lesson_periods
=
list
(
lesson_periods
)
date_start
=
lesson_periods
[
0
].
lesson
.
validity
.
date_start
date_end
=
lesson_periods
[
-
1
].
lesson
.
validity
.
date_end
if
(
filter_dict
[
"
filter_date
"
]
and
filter_dict
.
get
(
"
date_start
"
)
>
date_start
...
...
@@ -288,6 +289,7 @@ def _generate_dicts_for_events_and_extra_lessons(
period
=
f
"
{
register_object
.
period
.
period
}
.
"
period_sort
=
register_object
.
period
.
period
else
:
register_object
.
annotate_day
(
register_object
.
date_end
)
day
=
(
f
"
{
date_format
(
register_object
.
date_start
)
}
"
f
"
–
{
date_format
(
register_object
.
date_end
)
}
"
...
...
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