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:
@@ -22,6 +22,8 @@
|
||||
* Add separate Python 2 and Python 3 versions of the
|
||||
MetadataType model .comma_splitter() static method.
|
||||
* Update the metadata app tests to work on Python 3.
|
||||
* Make sure metadata lookup choices are a list to be able to add the
|
||||
optional marker (Python 3).
|
||||
|
||||
3.1.4 (2018-10-4)
|
||||
=================
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user