Correct attr in lookup as well.
This commit is contained in:
parent
97ab9c7541
commit
30b1a3d23d
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ def view(request):
|
||||||
codeName = fundGoal.fundraiser_code_name
|
codeName = fundGoal.fundraiser_code_name
|
||||||
returnDict[codeName] = {}
|
returnDict[codeName] = {}
|
||||||
for kk in keysForJSON:
|
for kk in keysForJSON:
|
||||||
if hasattr(codeName, kk):
|
if hasattr(fundGoal, kk):
|
||||||
returnDict[codeName][kk] = getattr(fundGoal, kk)
|
returnDict[codeName][kk] = getattr(fundGoal, kk)
|
||||||
|
|
||||||
return JsonResponse( returnDict)
|
return JsonResponse( returnDict)
|
||||||
|
|
Loading…
Reference in a new issue