django-ordered-model icon indicating copy to clipboard operation
django-ordered-model copied to clipboard

Method `to` can set value greater than max_order

Open sjquant opened this issue 4 years ago • 1 comments

Currently, I can use to method to set value greater than max_order. I think that it is necessary to check first whether given value is greater than max_value. If you think so, I can create a pull request to handle it.

sjquant avatar Oct 14 '21 04:10 sjquant

Confirmed this is a bug I have encountered. It might be possible to set resulting order to the minimum of the to() argument and the maximum existing value using an f()-expression.

shuckc avatar Feb 19 '22 23:02 shuckc