Mercurial > public > sg101
comparison bio/badges.py @ 789:9e803323a0d0
Removing AUTH_PROFILE_MODULE and get_profile().
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 23 May 2014 15:10:11 -0500 |
parents | ee87ea74d46b |
children | 5892c05886a9 |
comparison
equal
deleted
inserted
replaced
788:84aa49497718 | 789:9e803323a0d0 |
---|---|
19 badge = Badge.objects.get(numeric_id=badge_id) | 19 badge = Badge.objects.get(numeric_id=badge_id) |
20 except Badge.DoesNotExist: | 20 except Badge.DoesNotExist: |
21 logging.error("Can't award badge with numeric_id = %d", badge_id) | 21 logging.error("Can't award badge with numeric_id = %d", badge_id) |
22 return | 22 return |
23 | 23 |
24 profile = user.get_profile() | 24 profile = user.profile |
25 | 25 |
26 # Does the user already have badges of this type? | 26 # Does the user already have badges of this type? |
27 try: | 27 try: |
28 bo = BadgeOwnership.objects.get(profile=profile, badge=badge) | 28 bo = BadgeOwnership.objects.get(profile=profile, badge=badge) |
29 except BadgeOwnership.DoesNotExist: | 29 except BadgeOwnership.DoesNotExist: |