From 16dce6b3aa48066e316f8c2d412687979584cd3b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 7 Oct 2018 03:39:39 -0400 Subject: [PATCH] Make sure metadata lookup choices are a list to be able to add the optional marker (Python 3). Signed-off-by: Roberto Rosario --- HISTORY.rst | 2 ++ mayan/apps/metadata/forms.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 49665fc898..1fefb4ece6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -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) ================= diff --git a/mayan/apps/metadata/forms.py b/mayan/apps/metadata/forms.py index 83153abaae..9c6c2663dc 100644 --- a/mayan/apps/metadata/forms.py +++ b/mayan/apps/metadata/forms.py @@ -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