Fix a couple problems with the related user widget and avatars.

Review Request #9896 — Created April 27, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
32c75a2...

Reviewers

The related-user widget had two problems when dealing with avatars: one
on the server side, and one on the client.

On the server, if no avatar services were available for a user, we'd get
an uncaught AttributeError when trying to get the
get_avatar_urls_uncached method on a NoneType. On the client, once
we'd discovered a user without any avatars, we'd neglect to add a blank
avatarURL field to the data for the widget, resulting in a JavaScript
error.

Set the default avatar service to "None" and added an avatar-less user
to a group. Loaded that group in the admin UI and saw that I could see
the page, including the users widget, without any Python or JavaScript
errors.

    Loading...