Fix another bug applying extra_vars to incompatible job types

This commit is contained in:
Alan Rominger
2022-09-19 16:03:31 -04:00
parent dca27b59c9
commit 816e491d17
2 changed files with 8 additions and 4 deletions

View File

@@ -965,10 +965,14 @@ class LaunchTimeConfigBase(BaseModel):
'execution_environment', # already a unified job and unified JT field
)
def prompts_dict(self, display=False):
def prompts_dict(self, display=False, for_cls=None):
data = {}
if for_cls:
cls = for_cls
else:
cls = JobTemplate
# Some types may have different prompts, but always subset of JT prompts
for prompt_name in JobTemplate.get_ask_mapping().keys():
for prompt_name in cls.get_ask_mapping().keys():
try:
field = self._meta.get_field(prompt_name)
except FieldDoesNotExist: