Re: OneToOneField not updating relationship with reverse relation after refresh_from_db()

2018-09-04 Thread Shivam Jindal
Actually, I was calling listener for *user* object So I needed the update *user* object. Currently, I have fetched the user object again( after saving member object) by calling User.objects.get(id=m.user_id) On Tue, Sep 4, 2018 at 11:47 PM, Adam Johnson wrote: > Correct, refresh_from_db() is exp

Re: OneToOneField not updating relationship with reverse relation after refresh_from_db()

2018-09-04 Thread Adam Johnson
Correct, refresh_from_db() is expected to only update the current model, not traverse to others linking it (which could be *many*). You'd want m.refresh_from_db() to refresh the fact that the user field on m has changed. On Sun, 2 Sep 2018 at 20:40, Ian Foote wrote: > On 02/09/18 19:59, Shivam J