Log when an existing link AGC is changed
This commit is contained in:
parent
2e387d0a94
commit
c0b485c1e1
|
@ -475,9 +475,10 @@ class LoginOrLinkView(PopupViewMixin, MspOAuthSessionViewMixin, View):
|
|||
unicode(request.user))
|
||||
if not created:
|
||||
# Previous links is replaced
|
||||
# XXX: we could add support for multi-link by changing the
|
||||
# unicity constraint tuple from (user,) to (user, agc).
|
||||
msp_account.agc = agc
|
||||
if msp_account.agc != agc:
|
||||
msp_account.agc = agc
|
||||
self.logger.info('msp link changed for user %r',
|
||||
unicode(request.user))
|
||||
msp_account.token = json.dumps(self.token)
|
||||
msp_account.save()
|
||||
else:
|
||||
|
|
Reference in New Issue