Commit f2652904 by Kálmán Viktor

dashboard: keep messages with with_reload

parent 5d59c0a9
...@@ -660,8 +660,10 @@ class AjaxOperationMixin(object): ...@@ -660,8 +660,10 @@ class AjaxOperationMixin(object):
resp = super(AjaxOperationMixin, self).post( resp = super(AjaxOperationMixin, self).post(
request, extra, *args, **kwargs) request, extra, *args, **kwargs)
if request.is_ajax(): if request.is_ajax():
store = messages.get_messages(request) store = []
store.used = True if not getattr(self, "with_reload", False):
store = messages.get_messages(request)
store.used = True
return HttpResponse( return HttpResponse(
json.dumps({'success': True, json.dumps({'success': True,
'with_reload': getattr(self, 'with_reload', False), 'with_reload': getattr(self, 'with_reload', False),
......
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 sign in to comment