Fix issue AC-677, field is referenced incorrectly causing exception

This commit is contained in:
Matthew Jones 2013-11-19 19:50:11 -05:00
parent f7081074d0
commit 1388ad4cc0

View File

@ -270,7 +270,7 @@ def model_to_dict(obj):
attr_d = {}
for field in obj._meta.fields:
# FIXME: This needs to be aware of fields not to be included in the AS delta log
if field not in Credential.PASSWORD_FIELDS:
if field.name not in Credential.PASSWORD_FIELDS:
attr_d[field.name] = str(getattr(obj, field.name, None))
else:
attr_d[field.name] = "hidden"