forked from CGM_Public/pretix_original
Clear settings cache after migration
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# Generated by Django 1.10.7 on 2017-05-21 09:42
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
@@ -12,6 +13,7 @@ def rename_placeholder(app, schema_editor):
|
||||
if setting.key == 'mail_text_order_placed':
|
||||
new_value = setting.value.replace('{paymentinfo}', '{payment_info}')
|
||||
setting.value = new_value
|
||||
cache.delete('hierarkey_{}_{}'.format('event', setting.object_id))
|
||||
setting.save()
|
||||
|
||||
|
||||
@@ -21,5 +23,5 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(rename_placeholder)
|
||||
migrations.RunPython(rename_placeholder, migrations.RunPython.noop)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user