• 
      

    fix broken default avatar when avatar service is file upload

    Review Request #10692 — Created Sept. 6, 2019 and updated

    Information

    Review Board
    release-3.0.x

    Reviewers

    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
    fix broken default avatar
    13d298d1f4fa0abe4a43afc81a2afa8ac899100b cathyQinQin
    Description From Last Updated

    The same comments about the change description I made on your other review request apply to this change.

    chipx86chipx86

    This will need unit tests that prove the fixes. Tests should reproduce the original problem, fail without your fix, and …

    chipx86chipx86

    I mentioned this in the other review request, but avatars don't always return URLs. The main point of call is …

    chipx86chipx86
    cathyzhang
    cathyzhang
    Review request changed
    Bugs:
    chipx86
    1. 
        
    2. Show all issues

      The same comments about the change description I made on your other review request apply to this change.

    3. Show all issues

      This will need unit tests that prove the fixes. Tests should reproduce the original problem, fail without your fix, and succeed with your fix.

    4. Show all issues

      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 return None if it has nothing to render. We need to make sure that that path behaves correctly.

      So, basically, AvatarService.render() in Djblets should return None if the URLs are None, and the code that calls for_user() and then render() should call the get_services_for_user() that I mentioned in the other review request and call render() on each until it gets a result.

    5.