are the script and the userfolder using the same DA, if their not then they are using different database connections and transaction isolation is causing your problem. -kapil On Sun, 2004-03-14 at 01:32, martin f krafft wrote:
I am experiencing a problem with my Zope application, interfacing with PostgreSQL through PsycopDA. The problem is basically that a python script creates a new record in a database table, which is used by exUserFolder as a backend for authentication (thus containing the list of all users). When this completes, the script calls another script which tries to change ownership of a ZoDB object to the newly created user, which fails because
"Only users in this site can be made owners."
I think the problem is rooted in the fact that python scripts work on databases in transaction batches, and as the script has not finished, the transaction adding the user has not been committed.
Other than issuing a manual COMMIT, how can I make sure that exUserFolder sees the changes made to a database while the script is still executing?
Thanks,