Closed mark-boute closed 8 months ago
@KiOui any idea why this is not unsetting the flag currently? I am stuck
@KiOui any idea why this is not unsetting the flag currently? I am stuck
The OrderSerializer
has the prioritize
field as read-only. It should be altered in such a way that deprioritize
overrules prioritize
. I think we have three options here:
prioritize
and deprioritize
both true is a weird situation.save
method to automatically set prioritize
to false
whenever deprioritize
is true
.OrderSerializer
to also accept the prioritize
field and then adjust the OrderRetrieveUpdateDestroyAPIView
such that it only accepts changes to the prioritize
field if the user has permission.For me, this is a frontend thingy. There's nothing wrong with both prioritize and deprioritize flags set in principle. It's just not the behavior people expect if they hit the button. So keep it in the API / serializer
I don't agree with you on that point. It's weird to have an order that both has priority and does not have priority. So I think migrating this to just one field that can either be prioritized, normal or deprioritized is the best option.
This has been fixed in #534
closes #525 Make sure that the prioritize flag is unset on de-prioritizing.