Skip to content
Snippets Groups Projects
Verified Commit 77cd82ff authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Allow more than one matching time period

Release as 2.0.1
parent 456fec93
No related branches found
Tags 2.0.1
No related merge requests found
Pipeline #113342 failed
......@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`2.0.1`_ - 2022-08-10
---------------------
Fixed
~~~~~
* Applying failed if there was more than one matching time period.
`2.0`_ - 2022-04-10
-------------------
......@@ -50,3 +58,6 @@ Added
.. _2.0b0: https://edugit.org/Katharineum/AlekSIS-App-Fritak/-/tags/2.0b0
.. _2.0b1: https://edugit.org/Katharineum/AlekSIS-App-Fritak/-/tags/2.0b1
.. _2.0: https://edugit.org/Katharineum/AlekSIS-App-Fritak/-/tags/2.0
.. _2.0.1: https://edugit.org/Katharineum/AlekSIS-App-Fritak/-/tags/2.0.1
......@@ -114,13 +114,13 @@ class ApplyForExemptionForm(forms.ModelForm):
_("Please select either a from lesson or a from time.")
)
elif not from_time and from_lesson:
from_time = time_periods.get(period=from_lesson)["time_start"]
from_time = time_periods.filter(period=from_lesson).first()["time_start"]
# Check to lesson or to time
if (to_time and to_lesson) or (not to_time and not to_lesson):
raise ValidationError(_("Please select either a to lesson or a to time."))
elif not to_time and to_lesson:
to_time = time_periods.get(period=to_lesson)["time_end"]
to_time = time_periods.filter(period=to_lesson).first()["time_end"]
self.cleaned_data["from_time"] = from_time
self.cleaned_data["to_time"] = to_time
......
[tool.poetry]
name = "AlekSIS-App-Fritak"
version = "2.0"
version = "2.0.1"
packages = [
{ include = "aleksis" }
]
......
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