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

Get validity ranges by Untis ID and the corresponding school term

parent a9b3c2d6
No related branches found
No related tags found
Loading
Pipeline #24468 passed
...@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_. ...@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
Unreleased Unreleased
---------- ----------
Fixed
~~~~~
* Get validity ranges by Untis ID and the corresponding school term.
Changed Changed
~~~~~~~ ~~~~~~~
......
...@@ -104,7 +104,9 @@ def import_terms(qs: Optional[QuerySet] = None,) -> Dict[int, chronos_models.Val ...@@ -104,7 +104,9 @@ def import_terms(qs: Optional[QuerySet] = None,) -> Dict[int, chronos_models.Val
school_term.save() school_term.save()
try: 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.") logger.info(" Validity range found by import reference.")
except chronos_models.ValidityRange.DoesNotExist: except chronos_models.ValidityRange.DoesNotExist:
try: 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