#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.
Note:
See TracTickets
for help on using tickets.
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.