Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.11.0 #5164

Merged
merged 1 commit into from
Oct 10, 2024
Merged

v1.11.0 #5164

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions engine/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@

# Faker that always returns unique values
class UniqueFaker(factory.Faker):
def __init__(self, provider, **kwargs):
if provider == "pyint":
# https://faker.readthedocs.io/en/master/providers/faker.providers.python.html#faker.providers.python.Provider.pyint
# https://raintank-corp.slack.com/archives/C06K1MQ07GS/p1728589562495709?thread_ts=1728586969.283779&cid=C06K1MQ07GS
kwargs["max_value"] = 9_999_999

super().__init__(provider, **kwargs)

@classmethod
def _get_faker(cls, locale=None):
return super()._get_faker(locale).unique
Expand Down
Loading