Skip to content

Commit

Permalink
Avoided recreating related cache during clearing.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Dec 21, 2015
1 parent 04dd3be commit ff1dcda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mutant/compat.py
Expand Up @@ -18,7 +18,7 @@ def clear_opts_related_cache(model_class):
opts = model_class._meta
children = [
related_object.related_model
for related_object in opts.related_objects if related_object.parent_link
for related_object in opts.__dict__.get('related_objects', []) if related_object.parent_link
]
opts._expire_cache()
for child in children:
Expand Down

0 comments on commit ff1dcda

Please sign in to comment.