Skip to content

Commit

Permalink
Merge pull request #98 from Brobin/arrayfield-guess-format
Browse files Browse the repository at this point in the history
Guess type to add to arrayfield
  • Loading branch information
AngelOnFira authored Jul 3, 2021
2 parents 4570e9c + bddce34 commit 3765a88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_seed/guessers.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def guess_format(self, field):
return lambda x: _timezone_format(faker.date_time())
if isinstance(field, DateField): return lambda x: faker.date()
if isinstance(field, TimeField): return lambda x: faker.time()
if isinstance(field, ArrayField): return lambda x: [faker.text()]
if isinstance(field, ArrayField):
return lambda x: [self.guess_format(field.base_field)(1)]

# TODO: This should be fine, but I can't find any models that I can use
# in a simple test case.
Expand Down

0 comments on commit 3765a88

Please sign in to comment.