Add DateTime type to the method match of CPSDirectory.utils
JoseLuis de la Rosa Triviño <joseluis.rosa-PttKq6FmaWE8QMA/Cy+x5VaTQe2KTcn/@public.gmane.org>
| Newsgroups | gmane.comp.web.zope.cps.devel |
|---|---|
| Message-ID | <767B5B40A4305B49869025D4BDFB34A6ED0A5E@iavante04.iavantefundacion.com> |
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/[email protected]/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-PttKq6FmaWE8QMA/Cy+x5VaTQe2KTcn/@public.gmane.org
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.
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel