40👍
✅
You want to use F()
objects.
from django.db.models import F
Objtree.objects.filter(pk__in=ids).update(sort_order=F('sort_order')+1)
Source:stackexchange.com