This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix deactivate a user if he does not have a profile #10252
Fix deactivate a user if he does not have a profile #10252
Changes from 2 commits
dcb3c1d
87304dd
a502c27
5352f7b
78fbd2f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the reason a
StoreError
is raised here is due toset_profile_avatar_url
performing anupdate
onprofiles
rather than anupsert
:synapse/synapse/storage/databases/main/profile.py
Lines 83 to 91 in 4b965c8
I think a more fundamental fix for this whole problem would actually just be to convert
set_profile_avatar_url
to useself.db_pool.simple_upsert
, like so:it'd probably be a good idea to do the same for
set_profile_displayname
as well, just to avoid the same issue in the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will make an update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can actually just pass the Python dict directory to
make_request
these days.