fix broken default avatar when avatar service is file upload
Review Request #10692 — Created Sept. 6, 2019 and updated
fix broken default avatar for users when avatar service in admin is chosen as file upload
After selecting file upload as avatar service, all default avatars in user page works well
Summary | ID | Author |
---|---|---|
13d298d1f4fa0abe4a43afc81a2afa8ac899100b | cathyQinQin |
Description | From | Last Updated |
---|---|---|
The same comments about the change description I made on your other review request apply to this change. |
chipx86 | |
This will need unit tests that prove the fixes. Tests should reproduce the original problem, fail without your fix, and … |
chipx86 | |
I mentioned this in the other review request, but avatars don't always return URLs. The main point of call is … |
chipx86 |
- Bugs:
-
-
The same comments about the change description I made on your other review request apply to this change.
-
This will need unit tests that prove the fixes. Tests should reproduce the original problem, fail without your fix, and succeed with your fix.
-
I mentioned this in the other review request, but avatars don't always return URLs. The main point of call is
render()
, which should also returnNone
if it has nothing to render. We need to make sure that that path behaves correctly.So, basically,
AvatarService.render()
in Djblets should returnNone
if the URLs areNone
, and the code that callsfor_user()
and thenrender()
should call theget_services_for_user()
that I mentioned in the other review request and callrender()
on each until it gets a result.