Skip to content

Commit

Permalink
Merge 92b4972 into 4f6fd1c
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Dec 4, 2018
2 parents 4f6fd1c + 92b4972 commit 3dfae6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mixer/backend/sqlalchemy.py
Expand Up @@ -214,6 +214,13 @@ def make_fabric(self, column, field_name=None, fake=False, kwargs=None): # noqa
if ftype is Enum:
return partial(faker.random_element, column.type.enums)

if fake and stype is None:
msg = 'cannot make fabric for field {fname} ({ftype})'.format(
fname=field_name,
ftype=ftype,
)
raise NameError(msg)

return super(TypeMixer, self).make_fabric(
stype, field_name=field_name, fake=fake, kwargs=kwargs)

Expand Down

0 comments on commit 3dfae6c

Please sign in to comment.