Skip to content

Commit

Permalink
Adjust to changes in tahrir-api
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Apr 16, 2024
1 parent a424d7b commit 636577f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tahrir/templates/master.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tahrir/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
)
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 636577f

Please sign in to comment.