Commit 18bc708f authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Fix query on signal

parent 9b6fdc37
......@@ -20,6 +20,7 @@ def lesson_created_or_updated(sender, instance: Lesson, **kwargs):
st = ScheduledTask.objects.filter(content_type=ct, object_id=instance.id)
if st.exists():
st = st.first()
previous_task_hask = st.task_hash
else:
st = ScheduledTask.objects.create(content_object=instance)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment