From 631a6ac5a574397e93730294ca0c9bdfdf186d1f Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Thu, 4 Jan 2018 21:42:13 +0100
Subject: [PATCH] Fixed small bug in chapter import handler

---
 chapters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chapters.py b/chapters.py
index 5c8333e..a0d35b2 100644
--- a/chapters.py
+++ b/chapters.py
@@ -3,7 +3,7 @@ from server import *
 
 @job_handler('probe', 'probe-raw')
 def import_xmp_chapters(jobid, jobtype, data, state, status):
-	if 'lecture_id' not in data and data.get('import-chapters', False):
+	if 'lecture_id' not in data or not data.get('import-chapters', False):
 		return
 	times = set()
 	# Only add new chapters, deleted chapters are taken into account here
-- 
GitLab