Fix TypeError rendering VAPIDKeyset.public_key

This commit is contained in:
3wc 2021-04-15 18:57:05 +02:00
parent c64d1029b4
commit 0fdbd1f3b2

View File

@ -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(