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

Commit f240d7d

Browse files
committed
allow for optional to be null for back compatibility
1 parent 5d74874 commit f240d7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/books.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def dummy():
177177
(db.questions.subchapter == subchapter)
178178
& (db.questions.chapter == chapter)
179179
& (db.questions.from_source == True) # noqa: E712
180-
& (db.questions.optional == False)
180+
& ((db.questions.optional == False) | (db.questions.optional == None))
181181
& (db.questions.base_course == base_course)
182182
).select(db.questions.name)
183183
div_counts = {q.name: 0 for q in page_divids}
@@ -186,7 +186,7 @@ def dummy():
186186
& (db.questions.chapter == chapter)
187187
& (db.questions.base_course == base_course)
188188
& (db.questions.from_source == True) # noqa: E712
189-
& (db.questions.optional == False)
189+
& ((db.questions.optional == False) | (db.questions.optional == None))
190190
& (db.questions.name == db.useinfo.div_id)
191191
& (db.useinfo.course_id == auth.user.course_name)
192192
& (db.useinfo.sid == auth.user.username)

0 commit comments

Comments
 (0)