Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server error in admin page #70

Open
nitr0man opened this issue Dec 3, 2014 · 1 comment
Open

Server error in admin page #70

nitr0man opened this issue Dec 3, 2014 · 1 comment

Comments

@nitr0man
Copy link
Contributor

nitr0man commented Dec 3, 2014

When I tried to walk through admin page after email sending - I've got an error:

Internal Server Error: /admin/sendgrid/emailmessage/
Traceback (most recent call last):
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/core/handlers/base.py", line 139, in get_response
    response = response.render()
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/response.py", line 82, in rendered_content
    content = template.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 140, in render
    return self._render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/test/utils.py", line 85, in instrumented_test_render
    return self.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/test/utils.py", line 85, in instrumented_test_render
    return self.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/test/utils.py", line 85, in instrumented_test_render
    return self.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/defaulttags.py", line 305, in render
    return nodelist.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/template/base.py", line 1196, in render
    _dict = func(*resolved_args, **resolved_kwargs)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/suit/templatetags/suit_list.py", line 188, in result_list_with_context
    res = result_list(cl)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py", line 288, in result_list
    'results': list(results(cl))}
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py", line 266, in results
    yield ResultList(None, items_for_result(cl, res, None))
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py", line 258, in __init__
    super(ResultList, self).__init__(*items)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py", line 185, in items_for_result
    f, attr, value = lookup_field(field_name, result, cl.model_admin)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/django/contrib/admin/util.py", line 254, in lookup_field
    value = attr(obj)
  File "/home/user/kava/v_poliverse/lib/python2.7/site-packages/sendgrid/admin.py", line 173, in first_event_type
    return emailMessage.first_event.type.name
AttributeError: 'NoneType' object has no attribute 'type'

It seems that there's no hhandling of cases when no events noticed.

@nitr0man
Copy link
Contributor Author

nitr0man commented Dec 5, 2014

Trunk works OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant