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] )