4810: Avatar file upload fails if Gravatar is disabled

gwar

What version are you running?

3.0.14

What's the URL of the page containing the problem?

account/preferences/

What steps will reproduce the problem?

  1. Disable Gravatar from the admin -> Avatars
  2. Upload an avatar using the "file upload" option
  3. Save it ... kaboom ... error 500

What is the expected output? What do you see instead?

to upload the image without a 500

What operating system are you using? What browser?

Windows / Chrome

Please provide any additional information below.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, callback_args, callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/utils/decorators.py", line 29, in _wrapper
return bound_func(
args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/contrib/auth/decorators.py", line 22, in _wrapped_view
return view_func(request, *args,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/utils/decorators.py", line 25, in bound_func
return func(self, args2, kwargs2)
File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.11-py2.7.egg/djblets/util/decorators.py", line 77, in _call
f = augmented_func(*args,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/utils/decorators.py", line 29, in _wrapper
return bound_func(
args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/utils/decorators.py", line 99, in _wrapped_view
response = view_func(request, *args,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/utils/decorators.py", line 25, in bound_func
return func(self, args2, kwargs2)
File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.11-py2.7.egg/djblets/configforms/views.py", line 90, in dispatch
return super(ConfigPagesView, self).dispatch(request, *args,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/generic/base.py", line 87, in dispatch
return handler(request,
args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.11-py2.7.egg/djblets/configforms/views.py", line 134, in post
rsp = form.save()
File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.11-py2.7.egg/djblets/avatars/forms.py", line 240, in save
self.settings_manager.avatar_service_id)
File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.11-py2.7.egg/djblets/avatars/registry.py", line 174, in get_avatar_service
service_id=avatar_service_id))
DisabledServiceError: Could not fetch instance of gravatar service: This service is disabled.
pschwartz@reviewboard:~$