From 6b21afaa8fdab6fc33bfe01247c1f34ccd7d84f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 23 Aug 2015 13:48:28 +0200 Subject: [PATCH] Get current session before using it --- src/action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action.js b/src/action.js index 986fce6e0e..08af546bca 100644 --- a/src/action.js +++ b/src/action.js @@ -13,6 +13,7 @@ } else { context = jQuery.extend({}, context); } + var session = Sao.Session.current_session; if (!('date_format' in context)) { if (session.context.locale && session.context.locale.date) { context.date_format = session.context.locale.date; @@ -48,7 +49,6 @@ active_id: data.id || null, active_ids: data.ids }; - var session = Sao.Session.current_session; ctx = jQuery.extend(ctx, session.context); var eval_ctx = jQuery.extend({}, ctx); eval_ctx._user = session.user_id;