The recent code to make /solved clear the /state field was buggy in
that it would result in a dispatch_failed error in Slack if /state had
never been invoked previously.
# Set the status and solution fields in the database
puzzle['status'] = 'solved'
puzzle['solution'].append(args)
# Set the status and solution fields in the database
puzzle['status'] = 'solved'
puzzle['solution'].append(args)
+ if 'state' in puzzle:
+ del puzzle['state']
turb.table.put_item(Item=puzzle)
# Report the solution to the puzzle's channel
turb.table.put_item(Item=puzzle)
# Report the solution to the puzzle's channel