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

Set comment in revision to allocate the importer to the deletion

parent 141431be
No related branches found
No related tags found
1 merge request!44Set comment in revision to attribute the deletion to the importer
Pipeline #4725 passed
......@@ -4,6 +4,7 @@ from django.db.models import Q
from django.utils.translation import gettext as _
import reversion
from reversion import set_comment
from tqdm import tqdm
from aleksis.apps.chronos import models as chronos_models
......@@ -262,5 +263,6 @@ def import_lessons(
if lesson.lesson_id_untis and lesson.lesson_id_untis not in existing_lessons:
logger.info("Lesson {} deleted".format(lesson.id))
with reversion.create_revision():
set_comment(_("Deleted by UNTIS import"))
lesson.save()
lesson.delete()
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