From f6c523d30ab3f908a194afb189776fc51edff891 Mon Sep 17 00:00:00 2001 From: Thomas Koopman Date: Fri, 6 Dec 2024 12:09:45 +0100 Subject: [PATCH] Retain current selection of gpu type choice to avoid it getting lost When the options for choices is changed (in the relevant phases or organization or because the user has changed) the current selection can easily be lost if it's not included in the options. --- app/grandchallenge/algorithms/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/grandchallenge/algorithms/forms.py b/app/grandchallenge/algorithms/forms.py index 388e7b53a..8bd756bbb 100644 --- a/app/grandchallenge/algorithms/forms.py +++ b/app/grandchallenge/algorithms/forms.py @@ -441,6 +441,7 @@ def job_requirement_properties_from_organizations(self): @property def selectable_gpu_type_choices(self): choices_set = { + self.instance.job_requires_gpu_type, *get_default_gpu_type_choices(), *chain.from_iterable( self.job_requirement_properties_from_phases["gpu_type_choices"]