[Zope-CMF] invokeFactory query
Joseph Wayne Norton
norton@alum.mit.edu
Wed, 11 Jul 2001 00:25:30 +0900
Shane -
Relating to id generation ...
I made a small change to the factory method in my checked out version
of CMF. This change allows the "add" method for a "CMF Type" to
optionally compute the id if the id passed is None or ''. I'm also
re-using a portion of the code used to generate session ids in the
CoreSessionTracking product for id generation.
- joe n
===================================================================
RCS file: /cvs-repository/CMF/CMFCore/TypesTool.py,v
retrieving revision 1.17
diff -r1.17 TypesTool.py
476c476,478
< apply(m, (id,) + args, kw)
---
> mid = apply(m, (id,) + args, kw)
> if mid is not None:
> id = mid