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

Review Request #1200 — Created May 2, 2018 and updated

guest5830
Review Board
fc7783d...
demo
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.

Testing done:
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.

Reviewed at https://reviews.reviewboard.org/r/9896/


Loading...