Make sure metadata lookup choices are a list to be able to add the optional marker (Python 3).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-10-07 03:39:39 -04:00
parent 8d81d1df7b
commit 16dce6b3aa
2 changed files with 3 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ class DocumentMetadataForm(forms.Form):
label=self.fields['value'].label
)
choices = self.metadata_type.get_lookup_values()
choices = zip(choices, choices)
choices = list(zip(choices, choices))
if not required:
choices.insert(0, ('', '------'))
self.fields['value'].choices = choices