Skip to content

Commit fc60847

Browse files
authored
v1.11.0
2 parents a1270db + 93c0750 commit fc60847

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

engine/common/utils.py

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323

2424
# Faker that always returns unique values
2525
class UniqueFaker(factory.Faker):
26+
def __init__(self, provider, **kwargs):
27+
if provider == "pyint":
28+
# https://faker.readthedocs.io/en/master/providers/faker.providers.python.html#faker.providers.python.Provider.pyint
29+
# https://raintank-corp.slack.com/archives/C06K1MQ07GS/p1728589562495709?thread_ts=1728586969.283779&cid=C06K1MQ07GS
30+
kwargs["max_value"] = 9_999_999
31+
32+
super().__init__(provider, **kwargs)
33+
2634
@classmethod
2735
def _get_faker(cls, locale=None):
2836
return super()._get_faker(locale).unique

0 commit comments

Comments
 (0)