Fix TypeError rendering VAPIDKeyset.public_key
This commit is contained in:
parent
c64d1029b4
commit
0fdbd1f3b2
@ -14,7 +14,7 @@ class VAPIDKeyset(models.Model):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def public_key(self):
|
def public_key(self):
|
||||||
key_str = self.private_key
|
key_str = self.private_key.tobytes()
|
||||||
padding = len(key_str) % 4
|
padding = len(key_str) % 4
|
||||||
key_str += b"=" * padding
|
key_str += b"=" * padding
|
||||||
key = SigningKey.from_string(
|
key = SigningKey.from_string(
|
||||||
|
Reference in New Issue
Block a user