generator fix

This commit is contained in:
Jakub Adamski 2022-06-01 12:33:01 +02:00
parent 4d01fc8399
commit 6d5109df64

View File

@ -11,9 +11,9 @@ def generator_jezyka_nautalnego(frame, question, state):
if question == Questions.TIME:
print("Z jakiego czasu?")
elif state[-2]['questions'] != Questions.NONE and frame['act'] != "":
elif len(state) > 2 and state[-2]['questions'] != Questions.NONE and frame['act'] != "":
print("Przyjęto odpowiedź na pytanie.")
else:
#dont ask questions
if frame['act'] == "hello":