Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Link to UserProfile in cron task
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Nov 10, 2011
1 parent f836875 commit 3907e9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/users/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ def vouchify():
if by:
email = by[1]['mail'][0]
try:
user.vouched_by = User.objects.get(email=email)
user.vouched_by = (User.objects.get(email=email)
.get_profile())
except User.DoesNotExist:
log.warning('No matching user for %s' % email)
except UserProfile.DoesNotExist:
log.warning('No matching user_profile for %s' % email)
user.save()
log.info('Data copied for %s' % user.user.username)
log.debug('%s is still unvouched... skipping' % user.user.username)

0 comments on commit 3907e9d

Please sign in to comment.