Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix create_fake_user ID generation (#10186)
Andy Bearman86e2c69a9d8e
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.pyindex 8566e33983..d35eaa8e0a 100644--- a/saleor/core/utils/random_data.py+++ b/saleor/core/utils/random_data.py@@ -14,6 +14,7 @@ from unittest.mock import patchfrom django.conf import settingsfrom django.contrib.auth.models import Group, Permissionfrom django.core.files import File+from django.db import connectionfrom django.db.models import Ffrom django.utils import timezonefrom django.utils.text import slugify@@ -537,8 +538,11 @@ def create_fake_user(user_password, save=True):except User.DoesNotExist:pass+ _, max_user_id = connection.ops.integer_field_range(+ User.id.field.get_internal_type()+ )user = User(- id=fake.numerify(),+ id=fake.random_int(min=1, max=max_user_id),first_name=address.first_name,last_name=address.last_name,email=email,