diff --git a/src/ralph/dashboards/migrations/0008_auto_20250303_0923.py b/src/ralph/dashboards/migrations/0008_auto_20250303_0923.py new file mode 100644 index 0000000000..faae109f14 --- /dev/null +++ b/src/ralph/dashboards/migrations/0008_auto_20250303_0923.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 2.2.28 on 2025-03-03 09:23 +from __future__ import unicode_literals + +from django.core.cache import caches +from django.db import migrations + + +def clear_sitetree_cache(apps, schema_editor): + try: + cache = caches["default"] + cache.delete("sitetrees") + except Exception: + pass + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboards', '0007_auto_20240723_1148'), + ] + + operations = [ + migrations.RunPython( + code=clear_sitetree_cache, reverse_code=clear_sitetree_cache + ) + ]