app/soc/views/helper/forms.py
changeset 2366 1a954e80d444
parent 2077 fd2e83a297c7
equal deleted inserted replaced
2365:a66e1dd8ced7 2366:1a954e80d444
    71     for field_name in self.fields.iterkeys():
    71     for field_name in self.fields.iterkeys():
    72       field = self.fields[field_name]
    72       field = self.fields[field_name]
    73 
    73 
    74       # Since fields can be added only to the ModelForm subclass, check to
    74       # Since fields can be added only to the ModelForm subclass, check to
    75       # see if the Model has a corresponding field first.
    75       # see if the Model has a corresponding field first.
       
    76       # pylint: disable-msg=E1101
    76       if hasattr(self.Meta.model, field_name):
    77       if hasattr(self.Meta.model, field_name):
    77         model_prop = getattr(self.Meta.model, field_name)
    78         model_prop = getattr(self.Meta.model, field_name)
    78 
    79 
    79         for old, new in renames.iteritems():
    80         for old, new in renames.iteritems():
    80           value = getattr(model_prop, old, None)
    81           value = getattr(model_prop, old, None)