diff --git a/bmgt435_elp/apis.py b/bmgt435_elp/apis.py index 85a8c46..9a9f701 100644 --- a/bmgt435_elp/apis.py +++ b/bmgt435_elp/apis.py @@ -446,8 +446,8 @@ def import_users(request: HttpRequest, semester_id) -> HttpResponse: obj_set = [BMGTUser(semester = semester, **row) for row in user_csv.to_dict('records')] - BMGTUser.objects.bulk_create(obj_set) - resp.resolve(len(obj_set)) + created_set = BMGTUser.objects.bulk_create(obj_set) + resp.resolve(f"Imported {len(created_set)} users!") else: resp.reject("Import failed! Please upload a CSV file that contains the following columns: user_first_name, user_last_name, directory_id") except IntegrityError: