fix: Properly delete UserProfile.

This commit is contained in:
2025-06-11 19:33:08 +10:00
parent 48a01a2861
commit c3ed48e918

View File

@@ -195,7 +195,10 @@ class User:
async def delete(self) -> UserDetailsPayload:
payload = await self.prepare(details=True)
await self.row.delete()
# This will cascade to all other data the user has
await self.profile_data.UserProfileRow.table.delete_where(profileid=self.row.user_id)
# Make sure we take the user out of cache
await self.row.refresh()
return payload
async def get_wallet(self):