From b51d318f78930ed7c5f61bdfd93b03ba66becdf6 Mon Sep 17 00:00:00 2001 From: Varsha Menon Date: Tue, 27 Aug 2024 11:03:42 -0400 Subject: [PATCH] fix: move transaction atomic to right place --- .../apps/core/management/commands/bulk_add_course_staff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edx_exams/apps/core/management/commands/bulk_add_course_staff.py b/edx_exams/apps/core/management/commands/bulk_add_course_staff.py index f5581cac..0e73ea3f 100644 --- a/edx_exams/apps/core/management/commands/bulk_add_course_staff.py +++ b/edx_exams/apps/core/management/commands/bulk_add_course_staff.py @@ -44,6 +44,7 @@ def add_arguments(self, parser): dest='batch_delay', help='Time delay in seconds for each batch') + @transaction.atomic def handle(self, *args, **options): """ The main logic and entry point of the management command @@ -57,7 +58,6 @@ def handle(self, *args, **options): logger.info('Bulk add course staff complete!') - @transaction.atomic def add_course_staff_from_csv(self, csv_file, batch_size, batch_delay): """ Add the given set of course staff provided in csv