Skip to content
Snippets Groups Projects
Commit 91ed52cd authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'prepare-release-2.0rc2' into 'release/2.0'

Prepare release 2.0rc2

See merge request !209
parents 0d16bb00 24bb564a
No related branches found
No related tags found
1 merge request!209Prepare release 2.0rc2
Pipeline #19299 passed
......@@ -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.0rc2`_ - 2021-06-26
----------------------
Fixed
~~~~~
* "My overview" and "All lessons" didn't work if there was no current school term.
`2.0rc1`_ - 2021-06-23
----------------------
......@@ -141,3 +149,4 @@ Fixed
.. _2.0a1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/2.0a1
.. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/2.0b0
.. _2.0rc1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/2.0rc1
.. _2.0rc2: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/2.0rc2
......@@ -296,8 +296,14 @@ class FilterRegisterObjectForm(forms.Form):
def get_initial(cls, has_documentation: Optional[bool] = None):
date_end = timezone.now().date()
date_start = date_end - timedelta(days=30)
school_term = SchoolTerm.current
# If there is no current school year, use last known school year.
if not school_term:
school_term = SchoolTerm.objects.all().last()
return {
"school_term": SchoolTerm.current,
"school_term": school_term,
"date_start": date_start,
"date_end": date_end,
"has_documentation": has_documentation,
......
......@@ -336,6 +336,11 @@ def generate_list_of_all_register_objects(filter_dict: Dict[str, Any]) -> List[D
# Always force a value for school term, start and end date so that queries won't get too big
initial_filter_data = FilterRegisterObjectForm.get_initial()
filter_dict["school_term"] = filter_dict.get("school_term", initial_filter_data["school_term"])
# If there is not school year at all, there are definitely no data.
if not filter_dict["school_term"]:
return []
filter_dict["date_start"] = filter_dict.get("date_start", initial_filter_data["date_start"])
filter_dict["date_end"] = filter_dict.get("date_end", initial_filter_data["date_end"])
filter_dict["filter_date"] = bool(filter_dict.get("date_start")) and bool(
......
[tool.poetry]
name = "AlekSIS-App-Alsijil"
version = "2.0rc1"
version = "2.0rc2"
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