@transaction.atomic() def some_function(): MyModelOne.objects.filter(name="Name").select_for_update().update(status='active') MyModelOne.objects.filter(code="abc").select_for_update().update(status='inactive')
Is there any sense in code above? Or just transaction.atomic() is enough?
2.1m questions
2.1m answers
60 comments
57.0k users