Also prefill year between game and edition

This commit is contained in:
Lukáš Kucharczyk 2023-11-09 21:20:12 +01:00
parent 881e5df3d1
commit cbf872d21f
1 changed files with 6 additions and 1 deletions

View File

@ -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()