~ltp-devs/loco-team-portal/0.2

« back to all changes in this revision

Viewing changes to loco_directory/common/launchpad.py

  • Committer: Chris Johnston
  • Date: 2011-03-06 19:56:17 UTC
  • mfrom: (414.1.1 trunk)
  • Revision ID: chrisjohnston@ubuntu.com-20110306195617-be4b67ba79s46m8r
Fixes error in lpupdate. Props mhall119

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
            openid_assoc = openids[0]
111
111
        openid = get_permanent_openid_from_username(user.username)
112
112
        if openid is not None:
113
 
            if force:
114
 
                UserOpenID.objects.filter(claimed_id=openid.local_id).delete()
 
113
            claimed_by = UserOpenID.objects.filter(claimed_id=openid.local_id)
 
114
            if bool(claimed_by):
 
115
                if force:
 
116
                    claimed_by.delete()
 
117
                else:
 
118
                    return False
 
119
                    
115
120
            openid_assoc.claimed_id = openid.local_id
116
121
            openid_assoc.display_id = openid.local_id
117
122
            openid_assoc.save()