[web2py] Re: using before and after update callback simultaneously on the same table

2017-08-18 Thread 黄祥
thanks leonel for the hints, find the solution with update_naive, because the logic for the real code is to recalculate the order table when it's update e.g. use update_naive def __after_update_order(s, f): if not ('is_active' in f and f['is_active'] == False): s.update_naive(notes = 'test')

[web2py] Re: using before and after update callback simultaneously on the same table

2017-08-18 Thread Leonel Câmara
It's possible, but not if they're doing what yours are. Namely the problem here is not that you have a before and after update callback. The problem is your __after_update_order. Your __after_update_order updates table *order* which triggers __after_update_order again. This would be ok if you