Commits

James Crasta  committed 78c16bb

Fix NameError issue in converting PGInet. Fixes #68.

  • Participants
  • Parent commits 4729b5c

Comments (0)

Files changed (1)

File wtforms/ext/sqlalchemy/orm.py

 
         if column.nullable:
             kwargs['validators'].append(validators.Optional())
-        
+
         if self.use_mro:
             types = inspect.getmro(type(column.type))
         else:
 
     @converts('databases.postgres.PGInet', 'dialects.postgresql.base.INET')
     def conv_PGInet(self, field_args, **extra):
-        kwargs.setdefault('label', u'IP Address')
-        kwargs['validators'].append(validators.IPAddress())
-        return f.TextField(**kwargs)
+        field_args.setdefault('label', u'IP Address')
+        field_args['validators'].append(validators.IPAddress())
+        return f.TextField(**field_args)
 
 
 def model_fields(model, only=None, exclude=None, field_args=None, converter=None):