forked from GithubBackups/healthchecks
Merge pull request #165 from MounirMesselmeni/patch-1
When setting api key, decode the generated key from bytes to str to avoid b'...' bit
This commit is contained in:
commit
e56ff22cbb
@ -118,7 +118,7 @@ class Profile(models.Model):
|
|||||||
emails.change_email(self.user.email, ctx)
|
emails.change_email(self.user.email, ctx)
|
||||||
|
|
||||||
def set_api_key(self):
|
def set_api_key(self):
|
||||||
self.api_key = urlsafe_b64encode(os.urandom(24))
|
self.api_key = urlsafe_b64encode(os.urandom(24)).decode()
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def checks_from_all_teams(self):
|
def checks_from_all_teams(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user