[Nuxeo-tickets] [Nuxeo Repository] #1805: Add DateTime type to the method match ofCPSDirectory.utils

Nuxeo Repository trac at nuxeo.com
Wed Jan 17 19:02:55 CET 2007


#1805: Add DateTime type to the method match ofCPSDirectory.utils
--------------------------+-------------------------------------------------
 Reporter:  jrosa         |       Owner:  jrosa    
     Type:  defect        |      Status:  new      
 Priority:  P1            |   Milestone:  CPS 3.4.4
Component:  CPSDirectory  |     Version:  TRUNK    
 Severity:  normal        |    Keywords:           
--------------------------+-------------------------------------------------
 Hello everybody,

 We have an instance of CPS 3.4.3 which uses CPSLDAPSetup, and we get an
 exception "iteration over non-sequence" when trying to use the search in
 the members directory.

 After a little research we have done these modifications to the module
 CPSDirectory.utils.py and got rid of the exception:

 Add the line to the top of the module

 {{{
              from DateTime import DateTime
 }}}

 In the method "match", replace the line:

 {{{
 isinstance(searched, (basestring, int, long, NoneType)
 }}}

 for

 {{{
 isinstance(searched, (basestring, int, long, NoneType, DateTime)
 }}}

 The next link goes to the line (in TRAC) that should be modified:

 http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSDirectory/trunk/utils.py#L152

 The reason to add the type DateTime is because is used for the field
 last_login_time. We had some other ticket related to this field http://www
 .mail-archive.com/cps-devel at lists.nuxeo.com/msg01828.html

-- 
Ticket URL: <http://svn.nuxeo.org/trac/pub/ticket/1805>
Nuxeo Repository <http://www.cps-project.org/>
Nuxeo Repository



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.