From 44153bc562d697a3e7d9b22edd884b948c7f7659 Mon Sep 17 00:00:00 2001
From: decentral1se <hi@decentral1.se>
Date: Wed, 7 Apr 2021 17:14:16 +0200
Subject: [PATCH] Re-work access to pub/priv keys for showing

---
 djangoldp_webpushnotification/admin.py  | 2 +-
 djangoldp_webpushnotification/models.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/djangoldp_webpushnotification/admin.py b/djangoldp_webpushnotification/admin.py
index 83aa596..324321c 100644
--- a/djangoldp_webpushnotification/admin.py
+++ b/djangoldp_webpushnotification/admin.py
@@ -7,7 +7,7 @@ class VAPIDKeysetAdmin(DjangoLDPAdmin):
 	readonly_fields = ('public_key_view', 'private_key_view')
 
 	def public_key_view(self, obj):
-		return obj.public_key.tobytes()
+		return obj.public_key
 
 	def private_key_view(self, obj):
 		return obj.private_key.tobytes()
diff --git a/djangoldp_webpushnotification/models.py b/djangoldp_webpushnotification/models.py
index 294c85c..de2e9dc 100644
--- a/djangoldp_webpushnotification/models.py
+++ b/djangoldp_webpushnotification/models.py
@@ -8,7 +8,7 @@ class VAPIDKeyset(models.Model):
 
 	def __str__(self):
 		return "public_key:{}... private_key:{}...".format(
-			self.public_key.tobytes()[:10],
+			self.public_key[:10],
 			self.private_key.tobytes()[:10]
 		)