@@ -159,14 +159,14 @@ async def edit_profile(request: Request, datasette):
159
159
# Get avatar URL if it exists
160
160
avatar_url = None
161
161
if profile_data .get ("has_avatar" ):
162
- avatar_url = _get_avatar_url (datasette , actor_id )
162
+ avatar_url = _get_avatar_url (datasette , str ( actor_id ) )
163
163
164
164
return Response .html (
165
165
await datasette .render_template (
166
166
"edit_profile.html" ,
167
167
{
168
168
"profile" : profile_data ,
169
- "profile_url" : datasette .urls .path (f"/~{ quote (actor_id )} " ),
169
+ "profile_url" : datasette .urls .path (f"/~{ quote (str ( actor_id ) )} " ),
170
170
"avatar_url" : avatar_url ,
171
171
"message" : message ,
172
172
},
@@ -217,7 +217,7 @@ async def view_profile(request: Request, datasette):
217
217
profile_data = dict (profile_row )
218
218
avatar_url = None
219
219
if profile_data .get ("has_avatar" ):
220
- avatar_url = _get_avatar_url (datasette , profile_data ["id" ])
220
+ avatar_url = _get_avatar_url (datasette , str ( profile_data ["id" ]) )
221
221
222
222
return Response .html (
223
223
await datasette .render_template (
@@ -257,7 +257,9 @@ async def list_profiles(request: Request, datasette):
257
257
# Determine the correct URL for the profile view
258
258
profile_dict ["view_url" ] = datasette .urls .path (f"/~{ quote (profile_dict ['id' ])} " )
259
259
if profile_dict ["has_avatar" ]:
260
- profile_dict ["avatar_url" ] = _get_avatar_url (datasette , profile_dict ["id" ])
260
+ profile_dict ["avatar_url" ] = _get_avatar_url (
261
+ datasette , str (profile_dict ["id" ])
262
+ )
261
263
else :
262
264
profile_dict ["avatar_url" ] = None
263
265
profiles_list .append (profile_dict )
0 commit comments