diff MPIWGStaff.py @ 156:a9ad7dd7a8b2

clean up projects.
author casties
date Wed, 05 Jun 2013 13:12:42 +0200
parents 0d9eb2a859d3
children ee79f6ba8d01
line wrap: on
line diff
--- a/MPIWGStaff.py	Mon Jun 03 21:34:25 2013 +0200
+++ b/MPIWGStaff.py	Wed Jun 05 13:12:42 2013 +0200
@@ -716,13 +716,12 @@
         
     def getPublicationsFromPubman(self,limit=None,publicationType=None):
         """Return list of publications."""
-        
         if self.content.publications_mode=="year": 
             coneId = self.getConeId();
             if coneId:
                 pubs = self.folder.mpiwgPubman.getPublications(coneId,limit=limit,publicationType=publicationType)
                 #pubs= self.folder.getPublicationsFromPubman(coneId,limit=limit,publicationType=publicationType)
-            return pubs
+                return pubs
         
         elif self.content.publications_mode=="priority":
             selPubs= self.getSelectedPublications()
@@ -734,7 +733,6 @@
                     break
                 
                 logging.debug("searchFor:%s"%selPub.escidocid)
-                
                 entry = self.mpiwgPubman.getEntryFromPubman(selPub.escidocid,extendedData=True);
                 
                 #TODO getEntryFromPubmanShould return long texts
@@ -742,16 +740,19 @@
                                 'http://purl.org/eprint/type/BookItem':'book-item',
                                 'http://purl.org/escidoc/metadata/ves/publication-types/article':'article'};
                 
-                if publicationType is not None: #publicaitions typ ist gesetzt 
+                if publicationType is not None: 
+                    #publicaitions typ ist gesetzt 
                    
-                    if not ((entry[1] == publicationType) or  (entry[1] == typesLongShort.get(publicationType,''))) : #stimmt nicht dann weiter
+                    if not ((entry[1] == publicationType) or  (entry[1] == typesLongShort.get(publicationType,''))) : 
+                        #stimmt nicht dann weiter
                         continue;
                     
                 pubs.append((selPub.escidocid,entry[0],entry[2],entry[3],entry[4]));
                 count+=1
                 
             return pubs
-        return {}
+
+        return []
     
     
     def publications_full_html(self, REQUEST):