Get rid of eval in metadata type default and lookup fields. gh-issue #151.

This commit is contained in:
Roberto Rosario
2015-07-23 02:49:29 -04:00
parent 58d919d173
commit 0a0a92116e
9 changed files with 188 additions and 40 deletions

View File

@@ -104,7 +104,9 @@ def get_metadata_string(document):
"""
Return a formated representation of a document's metadata values
"""
return ', '.join(['%s - %s' % (document_metadata.metadata_type, document_metadata.value) for document_metadata in document.metadata.all()])
return ', '.join(
['%s - %s' % (document_metadata.metadata_type, document_metadata.value) for document_metadata in document.metadata.all()]
)
def convert_dict_to_dict_list(dictionary):