Commit a74080cb authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Label field: prevent dead lock

parent f1c464fd
......@@ -207,11 +207,19 @@
}, {mutex: 'changestate'})
.allowPublicAcquisition("notifyInvalid", function (param_list) {
return this.changeState({error_text: param_list[0]});
// Label doesn't know when a subgadget calls notifyInvalid
// Prevent mutex dead lock by defering the changeState call
return this.deferErrorTextRender(param_list[0]);
})
.allowPublicAcquisition("notifyValid", function () {
return this.changeState({error_text: ''});
// Label doesn't know when a subgadget calls notifyValid
// Prevent mutex dead lock by defering the changeState call
return this.deferErrorTextRender('');
})
.declareJob('deferErrorTextRender', function (error_text) {
return this.changeState({error_text: error_text});
});
}(window, document, rJS, RSVP));
\ No newline at end of file
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.8273.15694.60620</string> </value>
<value> <string>964.59013.39016.42820</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1516274849.55</float>
<float>1516293734.37</float>
<string>UTC</string>
</tuple>
</state>
......
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