Skip to content

Commit c395f0d

Browse files
authored
Fix bug where refresh_tokens would not update the TapisOauthToken model (#1706)
1 parent 5545ad8 commit c395f0d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

designsafe/apps/auth/models.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ def update(self, **kwargs):
9696

9797
def refresh_tokens(self):
9898
"""Refresh and update Tapis OAuth Tokens"""
99-
self.client.refresh_tokens()
99+
client = self.client
100+
client.refresh_tokens()
100101
self.update(
101102
created=int(time.time()),
102-
access_token=self.client.access_token.access_token,
103-
refresh_token=self.client.refresh_token.refresh_token,
104-
expires_in=self.client.access_token.expires_in().total_seconds(),
103+
access_token=client.access_token.access_token,
104+
refresh_token=client.refresh_token.refresh_token,
105+
expires_in=client.access_token.expires_in().total_seconds(),
105106
)
106107

107108
def __str__(self):

0 commit comments

Comments
 (0)