Fix signals
This commit is contained in:
parent
2189de9433
commit
85bee3e77c
1 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,7 @@ def profile_update(sender, instance, **kwargs):
|
|||
return
|
||||
|
||||
cache.delete_many(
|
||||
[make_template_fragment_key("user_about", (instance.id))]
|
||||
[make_template_fragment_key("user_about", (instance.id,))]
|
||||
+ [
|
||||
make_template_fragment_key("org_member_count", (org_id,))
|
||||
for org_id in instance.organizations.values_list("id", flat=True)
|
||||
|
@ -93,7 +93,7 @@ def contest_update(sender, instance, **kwargs):
|
|||
|
||||
cache.delete_many(
|
||||
["generated-meta-contest:%d" % instance.id]
|
||||
+ [make_template_fragment_key("contest_html", (instance.id))]
|
||||
+ [make_template_fragment_key("contest_html", (instance.id,))]
|
||||
)
|
||||
|
||||
|
||||
|
@ -127,8 +127,8 @@ def post_update(sender, instance, **kwargs):
|
|||
"blog_slug:%d" % instance.id,
|
||||
"blog_feed:%d" % instance.id,
|
||||
]
|
||||
+ [make_template_fragment_key("post_content", (instance.id,))]
|
||||
)
|
||||
cache.delete_many([make_template_fragment_key("post_content", (instance.id))])
|
||||
|
||||
|
||||
@receiver(post_delete, sender=Submission)
|
||||
|
@ -145,7 +145,7 @@ def contest_submission_delete(sender, instance, **kwargs):
|
|||
|
||||
@receiver(post_save, sender=Organization)
|
||||
def organization_update(sender, instance, **kwargs):
|
||||
cache.delete_many([make_template_fragment_key("organization_html", (instance.id))])
|
||||
cache.delete_many([make_template_fragment_key("organization_html", (instance.id,))])
|
||||
|
||||
|
||||
_misc_config_i18n = [code for code, _ in settings.LANGUAGES]
|
||||
|
|
Loading…
Reference in a new issue