From 967ff7df072fcdcb65bd6f380a2704f1c07b7168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Fri, 7 Feb 2025 20:21:14 +0100 Subject: [PATCH] Fix wrong purchase form field --- games/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/forms.py b/games/forms.py index 046b516..ae38f34 100644 --- a/games/forms.py +++ b/games/forms.py @@ -11,7 +11,7 @@ custom_datetime_widget = forms.DateTimeInput( autofocus_input_widget = forms.TextInput(attrs={"autofocus": "autofocus"}) -class GameChoiceField(forms.ModelChoiceField): +class GameChoiceField(forms.ModelMultipleChoiceField): def label_from_instance(self, obj) -> str: return f"{obj.sort_name} ({obj.platform}, {obj.year_released})"