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
672baf26
Commit
672baf26
authored
2 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Only check carry over form field if the corresponding preference is turned on
parent
0552868d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!286
Resolve "KeyError: 'carry_over_week' if preference is disabled"
Pipeline
#74393
passed
2 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
aleksis/apps/alsijil/forms.py
+2
-1
2 additions, 1 deletion
aleksis/apps/alsijil/forms.py
with
3 additions
and
1 deletion
CHANGELOG.rst
+
1
−
0
View file @
672baf26
...
...
@@ -22,6 +22,7 @@ Fixed
* The week overview page was not refreshed when a new week was selected in the dropdown.
* Make generation of full register printout faster.
* Updating a lesson documentation caused an error when the preference for carrying over lesson documentations to the whole week was deactivated.
`2.0.1`_ - 2022-02-12
---------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/forms.py
+
2
−
1
View file @
672baf26
...
...
@@ -58,7 +58,8 @@ class LessonDocumentationForm(forms.ModelForm):
def
save
(
self
,
**
kwargs
):
lesson_documentation
=
super
(
LessonDocumentationForm
,
self
).
save
(
commit
=
True
)
if
(
self
.
cleaned_data
[
"
carry_over_week
"
]
get_site_preferences
()[
"
alsijil__allow_carry_over_same_week
"
]
and
self
.
cleaned_data
[
"
carry_over_week
"
]
and
(
lesson_documentation
.
topic
or
lesson_documentation
.
homework
...
...
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