Commited new metadata/document_type paradirm

This commit is contained in:
Roberto Rosario
2011-05-09 02:25:09 -04:00
parent 1b511574d9
commit e03a90883a
8 changed files with 128 additions and 86 deletions

View File

@@ -26,7 +26,7 @@ def document_create_fs_links(document):
if not document.exists():
raise Exception(_(u'Not creating metadata indexing, document not found in document storage'))
metadata_dict = {'document': document}
metadata_dict.update(dict([(metadata.metadata_type.name, SLUGIFY_FUNCTION(metadata.value)) for metadata in document.documentmetadata_set.all()]))
metadata_dict.update(dict([(metadata.metadata_type.name, SLUGIFY_FUNCTION(metadata.value)) for metadata in document.documentmetadata_set.all() if metadata.value]))
for metadata_index in document.document_type.metadataindex_set.all():
if metadata_index.enabled: