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
81c129d5
Commit
81c129d5
authored
2 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Plain Diff
Merge branch '223-data-check-holiday-lessondocumentation' into 'master'
Fix LessonDocumentationOnHolidaysDataCheck Closes
#223
See merge request
!301
parents
5c8fe455
5519c82b
No related branches found
No related tags found
1 merge request
!301
Fix LessonDocumentationOnHolidaysDataCheck
Pipeline
#86705
canceled
2 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
aleksis/apps/alsijil/data_checks.py
+2
-2
2 additions, 2 deletions
aleksis/apps/alsijil/data_checks.py
with
3 additions
and
2 deletions
CHANGELOG.rst
+
1
−
0
View file @
81c129d5
...
@@ -14,6 +14,7 @@ Fixed
...
@@ -14,6 +14,7 @@ Fixed
* Register absence form wasn't accessible without direct access to class register.
* Register absence form wasn't accessible without direct access to class register.
* Printing the full group register failed when a person had no personal notes.
* Printing the full group register failed when a person had no personal notes.
* Data checks reported all Lesson Documentations as being during Holidays if there was no Holiday object.
`2.1`_ - 2022-06-25
`2.1`_ - 2022-06-25
-------------------
-------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/data_checks.py
+
2
−
2
View file @
81c129d5
...
@@ -113,7 +113,7 @@ class LessonDocumentationOnHolidaysDataCheck(DataCheck):
...
@@ -113,7 +113,7 @@ class LessonDocumentationOnHolidaysDataCheck(DataCheck):
documentations
=
LessonDocumentation
.
objects
.
not_empty
().
annotate_date_range
()
documentations
=
LessonDocumentation
.
objects
.
not_empty
().
annotate_date_range
()
q
=
Q
()
q
=
Q
(
pk__in
=
[]
)
for
holiday
in
holidays
:
for
holiday
in
holidays
:
q
=
q
|
Q
(
day_end__gte
=
holiday
.
date_start
,
day_start__lte
=
holiday
.
date_end
)
q
=
q
|
Q
(
day_end__gte
=
holiday
.
date_start
,
day_start__lte
=
holiday
.
date_end
)
documentations
=
documentations
.
filter
(
q
)
documentations
=
documentations
.
filter
(
q
)
...
@@ -147,7 +147,7 @@ class PersonalNoteOnHolidaysDataCheck(DataCheck):
...
@@ -147,7 +147,7 @@ class PersonalNoteOnHolidaysDataCheck(DataCheck):
personal_notes
=
PersonalNote
.
objects
.
not_empty
().
annotate_date_range
()
personal_notes
=
PersonalNote
.
objects
.
not_empty
().
annotate_date_range
()
q
=
Q
()
q
=
Q
(
pk__in
=
[]
)
for
holiday
in
holidays
:
for
holiday
in
holidays
:
q
=
q
|
Q
(
day_end__gte
=
holiday
.
date_start
,
day_start__lte
=
holiday
.
date_end
)
q
=
q
|
Q
(
day_end__gte
=
holiday
.
date_start
,
day_start__lte
=
holiday
.
date_end
)
personal_notes
=
personal_notes
.
filter
(
q
)
personal_notes
=
personal_notes
.
filter
(
q
)
...
...
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