Commit 8db2df12 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Label field: prevent dead lock

parent 3fb4412d
...@@ -207,11 +207,19 @@ ...@@ -207,11 +207,19 @@
}, {mutex: 'changestate'}) }, {mutex: 'changestate'})
.allowPublicAcquisition("notifyInvalid", function (param_list) { .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 () { .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)); }(window, document, rJS, RSVP));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>964.8273.15694.60620</string> </value> <value> <string>964.59013.39016.42820</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1516274849.55</float> <float>1516293734.37</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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