Skip to content

Commit 8f21dad

Browse files
committed
Add defensive fallback
1 parent f0935e5 commit 8f21dad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonwhat/checks/check_logic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
str(fail.__doc__)
112112
+ """
113113
:Example:
114-
114+
115115
As a trivial SCT example, ::
116116
117117
Ex().check_for_loop().check_body().fail()
@@ -150,7 +150,7 @@ def override(state, solution):
150150
new_ast = node
151151
break
152152

153-
kwargs = state.feedback_context.kwargs
153+
kwargs = state.feedback_context.kwargs if state.feedback_context else {}
154154
child = state.to_child(
155155
solution_ast=new_ast,
156156
student_ast=state.student_ast,

0 commit comments

Comments
 (0)