Skip to content

Change IntegerField and PositiveIntegerField to smaller integer provider. #14

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

Merged
merged 1 commit into from
Jun 29, 2015

Conversation

paulshannon
Copy link
Contributor

faker.rand_int(-4294967295, 4294967295) return values outside range supported by all django databases (-2147483648 to 2147483647): https://docs.djangoproject.com/en/1.8/ref/models/fields/#integerfield

Alternatively, you could:

if isinstance(field, IntegerField): return lambda x: random.randint(-2147483648 , 2147483647)

faker.rand_int(-4294967295, 4294967295) return values outside range supported by all django databases (-2147483648 to 2147483647): https://docs.djangoproject.com/en/1.8/ref/models/fields/#integerfield

Alternatively, you could:

  if isinstance(field, IntegerField): return lambda x: random.randint(-2147483648 , 2147483647)
@Brobin
Copy link
Owner

Brobin commented Jun 29, 2015

Looks good, thanks!

Brobin added a commit that referenced this pull request Jun 29, 2015
Change IntegerField and PositiveIntegerField to smaller integer provider.
@Brobin Brobin merged commit b17b7b2 into Brobin:master Jun 29, 2015
@paulshannon paulshannon deleted the patch-1 branch June 29, 2015 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants