Avatar not displaying

Hey, so the update :smiley:

I’ve destroyed avatars for all users and it helped, kind of
Now all users have the default initials shown and users who previously had issue where the avatar wasn’t displayed (it was a blank circle) also have their initials shown.

Log:

ERROR – : no implicit conversion of nil into String (TypeError) app/models/avatar.rb:361:in block in list'app/models/avatar.rb:357:in list'app/controllers/users_controller.rb:773:in avatar_list'app/controllers/application_controller/handles_transitions.rb:16:in handle_transaction'

Which command did you use?

okay so I managed to fix the problem.
first, I used

user.update(image: nil, image_source: nil) if user

this sets null value for all users in a column image & image_source

and then I ran

Avatar.where(o_id: 26).destroy_all

In my case I only had few users who were experiencing no implicit conversion of nil into String” StatusCode: 500 so I could use id by id

And now it’s working as expected?

Yes, now we are all able to set avatar :slight_smile:

1 Like