Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all avatars to profile_picture and ensure that profile_picture is included in responses #271

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

timcowlishaw
Copy link
Contributor

@timcowlishaw timcowlishaw commented Oct 26, 2023

Needed for #166 - Currently, in various places where fablabbcn/smartcitizen-web renders a user, no profile picture is provided, leaving the default avatar showing.

I've also added a task rake import:old_avatar_images which will copy the old avatar across to the profile_picture for all users with an avatar who don't yet have a profile_picture. This will probably not do much in staging as it uses a different s3 bucket, but works well locally setting the credentials manually. When we run in production we should keep an eye on sidekiq to make sure the ActiveStorage AnalysisJobs complete successfully.

@timcowlishaw timcowlishaw force-pushed the bugfix/always-send-profile-picture-with-user branch from cacd017 to 0e5c3d8 Compare October 26, 2023 14:54
@timcowlishaw
Copy link
Contributor Author

@oscgonfer it'd be good to get this one into production soonish too if possible as it's kinda necessary for the profile-pictures work i need to do on smartcitizen-web!

timcowlishaw added a commit to fablabbcn/smartcitizen-web that referenced this pull request Oct 26, 2023
the User#avatar property is both deprecated and broken - this removs all reference to it from this application, using the new profile_picture field instead. Depends on fablabbcn/smartcitizen-api#271 and will need some testing once that is deployed.
@timcowlishaw timcowlishaw changed the title ensure that the profile_picture is sent in all responses with a user object Move all avatars to profile_picture and ensure that profile_picture is included in responses Oct 26, 2023
@oscgonfer oscgonfer merged commit af9a720 into master Oct 26, 2023
2 checks passed
@sentry-io
Copy link

sentry-io bot commented Oct 26, 2023

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ **ActionView::Template::Error: undefined method profile_picture_url' for #<ActionView::Base:0x00000000804648>** V0::MeController#index` View Issue

Did you find this useful? React with a 👍 or 👎

timcowlishaw added a commit to fablabbcn/smartcitizen-web that referenced this pull request Nov 20, 2023
the User#avatar property is both deprecated and broken - this removs all reference to it from this application, using the new profile_picture field instead. Depends on fablabbcn/smartcitizen-api#271 and will need some testing once that is deployed.
oscgonfer pushed a commit to fablabbcn/smartcitizen-web that referenced this pull request Nov 23, 2023
the User#avatar property is both deprecated and broken - this removs all reference to it from this application, using the new profile_picture field instead. Depends on fablabbcn/smartcitizen-api#271 and will need some testing once that is deployed.
@timcowlishaw timcowlishaw deleted the bugfix/always-send-profile-picture-with-user branch July 4, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants