There's an argument here that we really shouldn't be giving the user
two different fields if we're forcing them to be edited together, but
that's what we have right now.
sol.strip() for sol in solution.split(',')
]
sol.strip() for sol in solution.split(',')
]
+ # Verify that there's a solution if the puzzle is mark solved
+ if puzzle['status'] == 'solved' and not puzzle['solution']:
+ return submission_error("solution",
+ "A solved puzzle requires a solution.")
+
+ if puzzle['status'] == 'unsolved' and puzzle['solution']:
+ return submission_error("solution",
+ "An unsolved puzzle should have no solution.")
+
# Add any new rounds to the database
if new_rounds:
if 'rounds' not in puzzle:
# Add any new rounds to the database
if new_rounds:
if 'rounds' not in puzzle: