def invalidate_new_back_revs(event):
''' Invalidate objects that rev_link to us
Catch those objects which newly rev_link us
'''
context = event.object
updated = event.request._updated_uuid_paths
initial = event.request._initial_back_rev_links.get(context.uuid, {})
properties = context.upgrade_properties()
current = {
path: set(simple_path_ids(properties, path))
for path in context.type_info.merged_back_rev
}
for rel, uuids in current.items():
for uuid in uuids.difference(initial.get(rel, ())):
updated[uuid]
评论列表
文章目录