The function to get one cyclos account, doesn't check for status value, and could check for that.
Why not check for multiple account and clearly fail early if more than one ?
What is the cost of actually support multiple account ?
A bug emerged from this code in a special scenario where 2 accounts where available but only one was active, the inactive one was selected by the given function, and unrelated errors occured (the wrong account was forcePasswordUpdate)... etc...
In the following code:
https://github.com/Lokavaluto/lokavaluto-addons/blob/12.0/lcc_cyclos_base/models/res_partner.py#L33
The function to get one cyclos account, doesn't check for
status
value, and could check for that. Why not check for multiple account and clearly fail early if more than one ? What is the cost of actually support multiple account ?A bug emerged from this code in a special scenario where 2 accounts where available but only one was active, the inactive one was selected by the given function, and unrelated errors occured (the wrong account was forcePasswordUpdate)... etc...