From cbf872d21f2bcdf7eab54d8c731ff14801aade6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 9 Nov 2023 21:20:12 +0100 Subject: [PATCH] Also prefill year between game and edition --- games/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/games/views.py b/games/views.py index 04af9c8..e4f3f93 100644 --- a/games/views.py +++ b/games/views.py @@ -477,7 +477,12 @@ def add_edition(request, game_id=None): if game_id: game = Game.objects.get(id=game_id) form = EditionForm( - initial={"game": game, "name": game.name, "sort_name": game.sort_name} + initial={ + "game": game, + "name": game.name, + "sort_name": game.sort_name, + "year_released": game.year_released, + } ) else: form = EditionForm()