Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#20797 closed Bug (invalid)

Proxy model does not update original model's values

Reported by: Dima Kurguzov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5
Severity: Normal Keywords: proxy model
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am developing a simple site for publishing jobs for Django developers in Russia.
I suppose, I met a bug.

I test view to changed value of model's field here.
I use proxy model's value to compare with the expected value. When I assert proxy model's value it fails. On the contrary it goes green when filter proxy model by primary key to assert.

Change History (2)

comment:1 Changed 7 years ago by Anssi Kääriäinen

Resolution: invalid
Status: newclosed

If I am reading the test case correctly, you are expecting that an update to one instance will be visible in all other instances with same PK. Django doesn't work this way, each instance is independent of others. You will need to do a refetch of self.job to see changes done to other instances.

comment:2 Changed 7 years ago by Dima Kurguzov

Thank you.

Note: See TracTickets for help on using tickets.
Back to Top