One missed hadoop_version->plugin_version

Change-Id: I7696d4bda30c72d3930fe01790903ab814246771
This commit is contained in:
Jeremy Freudberg 2018-07-31 11:30:19 -04:00
parent 55e129f866
commit 4585a9d004
1 changed files with 8 additions and 4 deletions

View File

@ -138,10 +138,14 @@ class GeneralConfigAction(workflows.Action):
plugin, hadoop_version = whelpers.\ plugin, hadoop_version = whelpers.\
get_plugin_and_hadoop_version(request) get_plugin_and_hadoop_version(request)
choices = [(template.id, template.name) choices = []
for template in templates for template in templates:
if (template.hadoop_version == hadoop_version and version = (
template.plugin_name == plugin)] getattr(template, "hadoop_version", None) or
template.plugin_version
)
if version == hadoop_version and template.plugin_name == plugin:
choices.append((template.id, template.name))
if not choices: if not choices:
choices.append(("", _("No Templates Available"))) choices.append(("", _("No Templates Available")))