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

Get validity ranges by Untis ID and the corresponding school term

(cherry picked from commit bfcc6f33)
parent 3a72136f
No related branches found
No related tags found
No related merge requests found
......@@ -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`_.
Unreleased
----------
Fixed
~~~~~
* Get validity ranges by Untis ID and the corresponding school term.
`2.0rc1`_ - 2021-06-23
----------------------
......
......@@ -104,7 +104,9 @@ def import_terms(qs: Optional[QuerySet] = None,) -> Dict[int, chronos_models.Val
school_term.save()
try:
validity_range = chronos_models.ValidityRange.objects.get(import_ref_untis=term_id)
validity_range = chronos_models.ValidityRange.objects.get(
import_ref_untis=term_id, school_term=school_term
)
logger.info(" Validity range found by import reference.")
except chronos_models.ValidityRange.DoesNotExist:
try:
......
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