Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only use set_up method if it actually exists

  • Loading branch information...
commit 31858b3137c00d407da1131a8f38700c8c8c40d4 1 parent 2e6ff9d
@matthiask matthiask authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  scaffolding/management/commands/scaffold.py
View
3  scaffolding/management/commands/scaffold.py
@@ -48,7 +48,8 @@ def make_factory(self, cls, count):
for field_name in field_names:
generator = getattr(scaffold, field_name, None)
if generator:
- generator.set_up(cls, count)
+ if hasattr(generator, 'set_up'):
+ generator.set_up(cls, count)
fields[field_name] = generator
text.append(u'%s: %s; ' % (field_name, fields[field_name]))
Please sign in to comment.
Something went wrong with that request. Please try again.