Skip to content

Commit 15ef1af

Browse files
committed
Added object pk to the cache key. Fixes issue ietf-tools#1929.
- Legacy-Id: 10956
1 parent e0d1c0b commit 15ef1af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def dehydrate(self, bundle, for_list=True):
206206

207207
# Up to this point we've copied the code from tastypie 0.13.1. Now
208208
# we add caching.
209-
cache_key = fk_resource.generate_cache_key('related', for_list=for_list)
209+
cache_key = fk_resource.generate_cache_key('related', pk=foreign_obj.pk, for_list=for_list, )
210210
dehydrated = fk_resource._meta.cache.get(cache_key)
211211
if dehydrated is None:
212212
fk_bundle = Bundle(obj=foreign_obj, request=bundle.request)

0 commit comments

Comments
 (0)