- rounds = [option['value'] for option in
- state['rounds']['rounds']['selected_options']]
- if rounds:
- puzzle['rounds'] = rounds
+ if 'rounds' in state:
+ rounds = [option['value'] for option in
+ state['rounds']['rounds']['selected_options']]
+ if rounds:
+ puzzle['rounds'] = rounds