Skip to content

Commit 2d504f2

Browse files
authored
Fix avatar url type of update avatar (#575)
1 parent fc34c98 commit 2d504f2

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)