[FIX] web: no traceback on button call action of type 'button'.
Before this commit, there was a traceback when clicking on a button that generates a button call action with type `'button'`. This is due to the handler of such an action that assumes only a small set of button actions. Each of those cases correctly sets the local variable `def` to a deferred, so that the post-processing is correct (i.e. it handles this variable as a deferred). However, this is wrong with a different button call action, so that this variable is `undefined` instead of a deferred. This commit fixes the issue by ensuring that the variable `def` is always a deferred. As a result, the post-processing can make the correct assumption that this variable is a deferred. Steps to reproduce: - Install Google Drive Integration app - Go to General Settings - In the category "Google Drive", click on "Get Authorization Code" (displayed as "Get Author...") Task-ID 1861630
This commit is contained in:
committed by
Alexandre Kühn
parent
23d840ddce
commit
78a6124d5a
@@ -663,7 +663,7 @@ ActionManager.include({
|
||||
var env = ev.data.env;
|
||||
var context = new Context(env.context, actionData.context || {});
|
||||
var recordID = env.currentID || null; // pyeval handles null value, not undefined
|
||||
var def;
|
||||
var def = $.Deferred();
|
||||
|
||||
// determine the action to execute according to the actionData
|
||||
if (actionData.special) {
|
||||
|
||||
Reference in New Issue
Block a user