BOM-356
None type comparison with int was not working in python3. There was an issue with previous condition also. with Nonetype it was not coming into error part.
This commit is contained in:
@@ -791,7 +791,7 @@ def _move_item(source_usage_key, target_parent_usage_key, user, target_index=Non
|
||||
else:
|
||||
try:
|
||||
target_index = int(target_index) if target_index is not None else None
|
||||
if len(target_parent.children) < target_index:
|
||||
if target_index is not None and len(target_parent.children) < target_index:
|
||||
error = _(u'You can not move {source_usage_key} at an invalid index ({target_index}).').format(
|
||||
source_usage_key=text_type(source_usage_key),
|
||||
target_index=target_index
|
||||
|
||||
Reference in New Issue
Block a user