[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.27

Chris Withers chrisw@nipltd.com
Sun, 10 Mar 2002 07:49:29 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv10747

Modified Files:
	ActionsTool.py 
Log Message:
calirfy duplicate action situation.

=== CMF/CMFCore/ActionsTool.py 1.26 => 1.27 ===
                 if catlist is None:
                     filtered_actions[category] = catlist = []
-                # Filter out duplicate actions
+                # Filter out duplicate actions by identity...
                 if not action in catlist:
                     catlist.append(action)
+                # ...should you need it, here's some code that filters
+                # by equality (use instead of the two lines above)
+                #if not [a for a in catlist if a==action]:
+                #    catlist.append(action)
         return filtered_actions
 
     # listFilteredActions() is an alias.