Closed akszydelko closed 7 years ago
I have created a fix for the issue and pull requested the changes.
In my fix I have also considered #28, so the problem will not came back. And it will not because the following condition will be satisfied:
# existing instance, position not modified; no cleanup required
if current is not None and updated is None:
return current
So function will be left earlier as expected, after that we can safely replace the None value with -1, which will put the object at as the last one in the collection.
It is because of some recent changes #43, in some cases the
updated
value remains as None. E.g. when a field which serves as collection indicator is changed.Then it reaches the following line:
Source
Where python3 rises TypeError
unorderable types: int() >= NoneType()
, because non exact comparison are prohibited in python3.Source
But I guess the recent change #43 may also influence python2 and lead to unwanted behaviour, but I haven't analysed that.