Correct attr in lookup as well.

This commit is contained in:
Bradley M. Kuhn 2015-05-09 17:34:49 -07:00
parent 97ab9c7541
commit 30b1a3d23d

View file

@ -17,7 +17,7 @@ def view(request):
codeName = fundGoal.fundraiser_code_name
returnDict[codeName] = {}
for kk in keysForJSON:
if hasattr(codeName, kk):
if hasattr(fundGoal, kk):
returnDict[codeName][kk] = getattr(fundGoal, kk)
return JsonResponse( returnDict)