[Zope] Unexpected script behavior
Dieter Maurer
dieter@handshake.de
Wed, 4 Dec 2002 22:45:43 +0100
Michael Long writes:
> I am getting unexpected results from my python script. Here is a snippet
> form the python script:
>
> container.DeletePerson_sql(PersonId=PersonId) --[ZSQL Method]
> ClearPersonDetails() --[Python function]
> PersonList = container.GetPersonList_sql() --[ZSQL Method]
> request.set('PersonList', PersonList)
> return container.ContactTemplate() --[ZPT]
>
> After the person is successfully deleted from the database another call
> to the database is made to get a list of people and set that to
> 'PersonList'. This variable is then used to render the page. The problem
> is that the deleted person still shows up in the rendered page. When the
> page is called a second time the correct data is shown. I have validated
> that the data is deleted from the database when expected. Why would the
> 'PersonList' not have the correct data?
This looks like your database had a funny transaction concept.
What database are you using?
What database adapter?
Are both ZSQL methods using the same DA instance?
Dieter