Total cents pledged attribute typo

This commit is contained in:
Jeremy Zhang 2017-11-22 03:24:17 +00:00
parent 6d2d4dd19c
commit ec33d2c627

View File

@ -510,7 +510,7 @@ def format_patreon_user(user):
},
}
if usrobj["pledges"]:
usrobj["titan"]["total_cents_pledged"] = usrobj["pledges"][0]["total_historical_amount_cents"]
usrobj["titan"]["total_cents_pledged"] = usrobj["pledges"][0]["attributes"]["total_historical_amount_cents"]
dbpatreon = db.session.query(Patreon).filter(Patreon.user_id == user.id()).first()
if dbpatreon:
usrobj["titan"]["total_cents_synced"] = dbpatreon.total_synced