[Erp5-report] r41702 nicolas - /erp5/trunk/products/ERP5/mixin/discoverable.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 23 11:57:39 CET 2010


Author: nicolas
Date: Thu Dec 23 11:57:38 2010
New Revision: 41702

URL: http://svn.erp5.org?rev=41702&view=rev
Log:
Be more tolerant with previous implementation
Done by JPS

Modified:
    erp5/trunk/products/ERP5/mixin/discoverable.py

Modified: erp5/trunk/products/ERP5/mixin/discoverable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/mixin/discoverable.py?rev=41702&r1=41701&r2=41702&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] Thu Dec 23 11:57:38 2010
@@ -40,7 +40,8 @@ try:
 except ImportError:
   magic = None
 
-VALID_ORDER_KEY_LIST = ('user_login', 'content', 'filename', 'input')
+VALID_ORDER_KEY_LIST = ('user_login', 'content', 'filename', 'file_name',
+                        'input')
 
 CONTENT_INFORMATION_FORMAT = '_idiscoverable_content_information'
 
@@ -138,7 +139,7 @@ class DiscoverableMixin(CachedConvertabl
         raise AttributeError, "%s is not in valid order key list" % order_id
       method_id = 'getPropertyDictFrom%s' % convertToUpperCase(order_id)
       method = getattr(self, method_id)
-      if order_id == 'filename':
+      if order_id in ('filename', 'file_name',):
         if filename is not None:
           result = method(filename)
       elif order_id == 'user_login':



More information about the Erp5-report mailing list