I face the same problem, I am using a latest version of web2py and 
doing crud.settings.detect_record_change = False 
doesn't make changes

On Tuesday, August 30, 2011 10:37:54 PM UTC+5:30, simon wrote:
>
> Works with crud.settings.detect_record_change = False 
>
> Without this it fails any time you make 2 edits to the same record 
> within a session. Does not have to be 2 sequential changes e.g. I 
> change record 1 then record 2 then record 3.....then try to update 
> record 1 again and it fails. 
>
> On Aug 30, 4:15 am, Anthony <[email protected]> wrote: 
> > Yes, that is in fact the problem, but shouldn't you be able to make two 
> > edits to a record in a row without an intervening failure? It's not just 
> > that a failure message is missing -- the behavior seems wrong. 
> > 
> > Anthony 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Monday, August 29, 2011 10:44:35 PM UTC-4, Massimo Di Pierro wrote: 
> > 
> > > Can you try? 
> > 
> > > crud.settings.detect_record_change = False 
> > 
> > > SQLFORM has a mechanism to prevent two users from doing this: 
> > 
> > > user 1) visualize and edit record 
> > > user 2) visualize and edit record 
> > > user 1) save changes 
> > > user 2) save changes and override changes by user 1 
> > 
> > > in SQLFORM it is disabled by default. In crud it is enabled by 
> > > default. 
> > 
> > > crud.settings.detect_record_change = True 
> > 
> > > Still something is wrong because you should get a message about it. 
> > 
> > > On Aug 28, 2:18 pm, apple <[email protected]> wrote: 
> > > > If the database fails to update within CRUD is there a way I can 
> view 
> > > > the error? 
> > 
> > > > I have a controller with this code that works fine: 
> > > >        form=SQLFORM(table,a.id) 
> > > >        if form.accepts(request.vars, session): 
> > > >            response.flash="record updated" 
> > 
> > > > I replace it with: 
> > > >       form=crud.update(table, a.id) 
> > 
> > > > Now it works fine the first time the form is changed. Then the 
> second 
> > > > time it correctly calls the controller but the database is not 
> updated 
> > > > and the form reverts to the pre-change values. This continues so on 
> > > > odd submits it works and even submits it does not. 
> > 
> > > > It also seems to work on all submits when I excluded certain fields. 
> I 
> > > > am thinking maybe there is a database error thrown inside CRUD but 
> no 
> > > > error message is logged.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to