We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f75d7ea commit 75d5755Copy full SHA for 75d5755
1 file changed
backend/games/views.py
@@ -80,8 +80,8 @@ def post(self, request, date):
80
return Response({"error": "Duplicate words submitted."}, status=400)
81
82
legal_words = set(game.possible_words)
83
- invalid = [w for w in normalized if w not in legal_words]
84
- if invalid:
+ if any(w not in legal_words for w in normalized):
+ invalid = [w for w in normalized if w not in legal_words]
85
return Response(
86
{"error": "Invalid words submitted.", "invalid_words": invalid}, status=400
87
)
0 commit comments