Skip to content

Commit 76522fa

Browse files
committed
Fix avatar URL type in update_avatar method
1 parent 960d9f6 commit 76522fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/admin/crud/crud_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async def update_avatar(self, db: AsyncSession, input_user: int, avatar: AvatarP
142142
:param avatar: 头像地址
143143
:return:
144144
"""
145-
return await self.update_model(db, input_user, {'avatar': avatar.url})
145+
return await self.update_model(db, input_user, {'avatar': str(avatar.url)})
146146

147147
async def delete(self, db: AsyncSession, user_id: int) -> int:
148148
"""

0 commit comments

Comments
 (0)