failed api calls.

i have one user create service in which i have below code.

when i am calling or testing this api let say i have write a code to create 50 users. so it is only creating 10 user after that it is not saving any record. can anybody tell me why it is happening. i have pasted error as well.

type or paste code here.

    def post(self, request):
        """
        Handle POST requests to create a new user.

        Args:
            request: The POST request object containing user data.

        Returns:
            A response containing the created user's data upon success.
        """
        try:
            with transaction.atomic():
                # Log the creation process
                self.logger.info(LOGGER_MSG.get("CREATING").format(self.object_name))
                tenant_identifier = request.data.get("tenant_identifier")
                if tenant_identifier and tenant_identifier != "admin":
                    TenantConfigurationsService.set_tenant_db_alias(
                        request.data.get("tenant_identifier")
                    )
                    # Create the new user using UsersService
                    user = UsersService.create_user(request.data)
                    # Log the successful creation
                    self.logger.info(
                        LOGGER_MSG.get("CREATED").format("User", request.data)
                    )

                    tenant_email = user.get("email")
                    response = TenantAdminHelperService.update_tenant_admin_email(
                        email=tenant_email, tenant_identifier=tenant_identifier
                    )
                    if response.get("status") != 200:
                        return generate_error_response(
                            status=response.get("status"),
                            errors=response.get("errors"),
                        )
                    # Return a response with the created user's data
                    return generate_response(
                        status=status.HTTP_201_CREATED,
                        message=UsersMessages().create_user_message(),
                    )

                # Log the successful creation
                self.logger.info(LOGGER_MSG.get("CREATED").format("User", request.data))
                user = UsersService.create_user(request.data)
                # Return a response with the created user's data
                return generate_response(
                    status=status.HTTP_201_CREATED,
                    message=UsersMessages().create_user_message(),
                )

        except Exception as e:
            # Handle and log exceptions
            self.logger.error(LOGGER_MSG.get("ERROR").format(e))
            return handle_exception(e)

error
this below error i am getting in my second django application from where i am calling the above api.
api_text {"status":201,"message":[{"message_code":"M0005","message":"User added successfully."}]}
api_response <Response [201 Created]>
api_text {"status":201,"message":[{"message_code":"M0005","message":"User added successfully."}]}
api_response None
ERROR:root:Error on call 11: 'NoneType' object has no attribute 'text'
api_response None
ERROR:root:Error on call 12: 'NoneType' object has no attribute 'text'

The first thing I’d verify is that what you’re submitting is complete and correct. You can look at your browser’s developer tools to see what you’re sending.

calling api from admin.py or on pre_save signal is good idea or not?