Custom Query (1173 matches)
Results (196 - 198 of 1173)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#5355 | fixed | Graveyard media don't return serializable actors | ||
Description |
Related to #5354, entries in TypeError: <LocalUser #5 verified user "machalus"> is not JSON serializable As a temporary hack, I hardcoded the graveyard actor as shown below. After doing so, pumpa finally was able to pull my inbox and load media and comments. diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 0de14b4..8af520d 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -1566,7 +1566,8 @@ class Graveyard(Base): return { "id": self.public_id, "objectType": self.object_type, - "actor": self.actor(), + "actor": "bob", "published": deleted.isoformat(), "updated": deleted.isoformat(), "deleted": deleted.isoformat() |
|||
#5354 | fixed | Graveyard media don't return serializable timestamps | ||
Description |
Entries in From 7782960e044b9a366ac46cfaf687af4fceb17c3e Mon Sep 17 00:00:00 2001 From: ayleph <ayleph@thisshitistemp.com> Date: Sat, 31 Oct 2015 03:04:06 -0400 Subject: [PATCH] Return deleted time in serializable format --- mediagoblin/db/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 6765955..0de14b4 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -1562,13 +1562,14 @@ class Graveyard(Base): ) def serialize(self, request): + deleted = UTC.localize(self.deleted) return { "id": self.public_id, "objectType": self.object_type, "actor": self.actor(), - "published": self.deleted, - "updated": self.deleted, - "deleted": self.deleted + "published": deleted.isoformat(), + "updated": deleted.isoformat(), + "deleted": deleted.isoformat() } MODELS = [ -- 2.6.2 |
|||
#5353 | fixed | Error when using the API | ||
Description |
There is a problem with old references to the "user" property on the OAuth models. This happened ever since the commit where I changed the user/creator/publisher/uploader all to the "actor" property. This was reported to me in IRC by ayleph. |