[CPS-devel] Add DateTime type to the method match of CPSDirectory.utils

JoseLuis de la Rosa Triviño joseluis.rosa at iavantefundacion.com
Wed Jan 10 18:53:50 CET 2007


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:

 

1.	Add the line to the top of the module

 

             from DateTime import DateTime

 

2.	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@lists.nuxeo.com/msg01828.html 

 

Excuse me for not sending the solution to the repository by myself but I lost my credentials and I don't know how to retrieve them. If somebody at Nuxeo may help me I would appreciate it.

 

Thank you very much.

JoseLuis de la Rosa Triviño 
Técnico de Desarrollo Software 
FUNDACIÓN IAVANTE 
joseluis.rosa at iavantefundacion.com 
Tel. 951 015 300 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-devel/attachments/20070110/a4c22898/attachment-0001.html



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