Users without profiles are handled properly.

This does not really happen but this page is accessible to both:
organization members and program administrators. The latter group
is not required to have profiles. Therefore, the old code would
result in 500 server error.

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.5/django/core/handlers/base.py", line 113, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/base/data/home/apps/s~melange-dev-hrd/2-1-20150225-daniel.382789602067719821/soc/views/base.py", line 485, in __call__
    return self._dispatch(data, check, mutator)
  File "/base/data/home/apps/s~melange-dev-hrd/2-1-20150225-daniel.382789602067719821/soc/views/base.py", line 439, in _dispatch
    return self.get(data, check, mutator)
  File "/base/data/home/apps/s~melange-dev-hrd/2-1-20150225-daniel.382789602067719821/soc/views/base.py", line 108, in get
    context = self.context(data, check, mutator)
  File "/base/data/home/apps/s~melange-dev-hrd/2-1-20150225-daniel.382789602067719821/summerofcode/views/proposal_manage.py", line 869, in context
    is_admin = data.url_ndb_proposal.organization in data.ndb_profile.admin_for
AttributeError: 'NoneType' object has no attribute 'admin_for'

Change-Id: Ic1ec924fddf44639cd2b61d0b3b7be2cce0e4c3b
1 file changed