From 636577f8392f9cdf021d9cb5c62886cc80ae2a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Tue, 16 Apr 2024 14:59:58 +0200 Subject: [PATCH] Adjust to changes in tahrir-api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- poetry.lock | 2 +- tahrir/templates/master.mak | 2 +- tahrir/views.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index d84de5c..e8e18fa 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2336,7 +2336,7 @@ tahrir-messages = "^1.0.2" type = "git" url = "https://github.com/fedora-infra/tahrir-api" reference = "HEAD" -resolved_reference = "d1639265e734e56fb976bd8b7412e09ed1ca7e8e" +resolved_reference = "c0d87024de15570f8737740ea65618e8a601be2c" [[package]] name = "tahrir-messages" diff --git a/tahrir/templates/master.mak b/tahrir/templates/master.mak index 36b2a0d..3703f9b 100644 --- a/tahrir/templates/master.mak +++ b/tahrir/templates/master.mak @@ -95,7 +95,7 @@ import json } % if logged_in: - var userdata = ${ json.dumps(logged_in_person.__json__())|n }; + var userdata = ${ json.dumps(logged_in_person.as_dict())|n }; % else: var userdata = null; % endif diff --git a/tahrir/views.py b/tahrir/views.py index 580ee84..843b154 100644 --- a/tahrir/views.py +++ b/tahrir/views.py @@ -1149,8 +1149,8 @@ def _user_team_json_generator(request, team, user): for milestone in milestones: milestones_info.append( { - "milestone": milestone.__json__(), - "series": elem.__json__(), + "milestone": milestone.as_dict(), + "series": elem.as_dict(), "is_awarded": milestone.badge_id in assertion_ids, } ) @@ -1544,7 +1544,7 @@ def html(context, request): @view_config(context=m.Assertion, renderer="json") def json(context, request): - return context.__json__() + return context.as_dict() @view_config(context="pyramid.httpexceptions.HTTPNotFound", renderer="404.mak")