You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@marielejeune are we sure we need to call _update_programs_and_rewardshere?
I'm investigating an issue w/ permission when calling /sales. This is the error I get
It is forbidden to modify the following fields in a locked order:\nUnit Price
This comes from the write caused by the call to _update_programs_and_rewards and it looks suspicious to me because it will happen on GET calls for ALL the orders every time.
Plus, I can imagine that this will happen twice at least when on sync and update rewards a cart because this method is called explicitly there.
IMO we should not call this method here at all an rely on the updates to refresh this info and - in any case - it should be avoided on locked orders.
WDYT?
The text was updated successfully, but these errors were encountered:
It isn't fresh in my mind anymore, but as far as I remember, I needed to call it in from_sale_order to be able to get all claimable rewards, otherwise none of them appear.
There may exist another solution and I'm open to it.
Unfortunately I won't have time to think about it now, I'm trying to finish what I have on my plate before my maternity leave coming in a few days now... 🐣
It isn't fresh in my mind anymore, but as far as I remember, I needed to call it in from_sale_order to be able to get all claimable rewards, otherwise none of them appear. There may exist another solution and I'm open to it.
Ok, I'll do my research 😉
Unfortunately I won't have time to think about it now, I'm trying to finish what I have on my plate before my maternity leave coming in a few days now... 🐣
@marielejeune are we sure we need to call
_update_programs_and_rewards
here?I'm investigating an issue w/ permission when calling
/sales
. This is the error I getThis comes from the write caused by the call to
_update_programs_and_rewards
and it looks suspicious to me because it will happen on GET calls for ALL the orders every time.Plus, I can imagine that this will happen twice at least when on sync and update rewards a cart because this method is called explicitly there.
IMO we should not call this method here at all an rely on the updates to refresh this info and - in any case - it should be avoided on locked orders.
WDYT?
The text was updated successfully, but these errors were encountered: