Changes between Version 1 and Version 2 of Ticket #31891
- Timestamp:
- Aug 15, 2020, 1:04:31 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31891 – Description
v1 v2 32 32 }}} 33 33 34 I can fix it by using `a.profile.user = b` which does the cache invalidation as expected. Or using `b.refresh_from_db()` 34 I can fix it by using `a.profile.user = b` which does the cache invalidation as expected. Or using `b.refresh_from_db()`. However I think it makes sense to fix this within the ORM because it's a subtle bug that can cause issues. 35 35 This is a contrived example but the real use-case was cloning a model instance. And instead of erroring it just kept returning the cached value