changeset 602:ef1d0a1fc9fa

fix bug with no dc-metadata.
author casties
date Mon, 26 Nov 2012 13:49:43 +0100
parents 8c0625dfd36e
children 8ed0317633f8
files documentViewer.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Wed Nov 21 17:36:23 2012 +0100
+++ b/documentViewer.py	Mon Nov 26 13:49:43 2012 +0100
@@ -733,6 +733,16 @@
                 docinfo['presentationUrl'] = presentation
             else:
                 docinfo['presentationUrl'] = os.path.join(docPath, presentation)
+                
+        # make sure we have at least fake DC data
+        if 'creator' not in docinfo:
+            docinfo['creator'] = '[no author found]'
+            
+        if 'title' not in docinfo:
+            docinfo['title'] = '[no title found]'
+            
+        if 'date' not in docinfo:
+            docinfo['date'] = '[no date found]'
         
         return docinfo