[Commits] (donn) Fix DetailView when who returns an empty list of contacts.

commits at osafoundation.org commits at osafoundation.org
Mon Jul 12 13:47:28 PDT 2004


Commit by: donn
Modified files:
chandler/parcels/osaf/framework/blocks/detail/Detail.py 1.9 1.10

Log message:
Fix DetailView when who returns an empty list of contacts.

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/detail/Detail.py.diff?r1=text&tr1=1.9&r2=text&tr2=1.10

Index: chandler/parcels/osaf/framework/blocks/detail/Detail.py
diff -u chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.9 chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.10
--- chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.9	Sat Jul 10 13:51:49 2004
+++ chandler/parcels/osaf/framework/blocks/detail/Detail.py	Mon Jul 12 13:47:26 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.9 $"
-__date__ = "$Date: 2004/07/10 20:51:49 $"
+__version__ = "$Revision: 1.10 $"
+__date__ = "$Date: 2004/07/12 20:47:26 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -361,15 +361,12 @@
             item.who = toFieldString
        
     def loadAttributeIntoWidget (self, item, widget):
-        whoRedirect = item.getAttributeAspect('who', 'redirectTo')
-        try:
-            whoString = item.who # get redirected who list
-        except AttributeError:
-            whoString = ''
-        if len(whoString) > 0:
+        whoContacts = item.who # get redirected who list
+        whoString = ''
+        if len(whoContacts) > 0:
             whoNames = []
-            for whom in whoString.values():
-                whoNames += (whom.getItemDisplayName(),)
+            for whom in whoContacts.values():
+                whoNames.append(whom.getItemDisplayName())
             whoString = ', '.join(whoNames)
         widget.SetValue(whoString)
 



More information about the Commits mailing list