Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit f59bc3e

Browse files
committed
Fix: do not crash if el is None
1 parent a874eb2 commit f59bc3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runestone/pretext/chapter_pop.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ def manifest_data_to_db(course_name, manifest_path):
178178
# translate qtype to question_type
179179
qtype = QT_MAP.get(qtype, qtype)
180180
except:
181-
qtype = "webwork"
182-
dbtext = ET.tostring(el).decode("utf8")
181+
if el is not None:
182+
qtype = "webwork"
183+
dbtext = ET.tostring(el).decode("utf8")
184+
183185
valudict = dict(
184186
base_course=course_name,
185187
name=idchild,

0 commit comments

Comments
 (0)