Browse Source

Merge pull request #165 from MounirMesselmeni/patch-1

When setting api key, decode the generated key from bytes to str to avoid b'...' bit
pull/166/head
Pēteris Caune 7 years ago
committed by GitHub
parent
commit
e56ff22cbb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      hc/accounts/models.py

+ 1
- 1
hc/accounts/models.py View File

@ -118,7 +118,7 @@ class Profile(models.Model):
emails.change_email(self.user.email, ctx)
def set_api_key(self):
self.api_key = urlsafe_b64encode(os.urandom(24))
self.api_key = urlsafe_b64encode(os.urandom(24)).decode()
self.save()
def checks_from_all_teams(self):


Loading…
Cancel
Save