Commit 2595e65f authored by Mathieu Courcelles's avatar Mathieu Courcelles

Fixes possible cache issue

parent 5a0b5a36
Pipeline #14906206 passed with stage
in 1 minute and 15 seconds
......@@ -817,7 +817,7 @@ class DatasetAdminMixin(object):
# Restore queryset
random = request.POST.get('random')
cache = caches['default']
queryset = cache.get('queryset_%s' % random)
queryset = cache.get(f'queryset_{random}')
for q in queryset:
print(type(q))
......
......@@ -71,3 +71,10 @@ if os.getenv('SENTRY', None):
MIDDLEWARE_CLASSES.insert(0, 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware')
MIDDLEWARE_CLASSES.insert(0, 'x_forwarded_for.middleware.XForwardedForMiddleware')
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment