AttributeError: 'NoneType' object has no attribute 'extra_data'

NEW
Unassigned

Status

MozReview
General
P3
normal
3 years ago
2 years ago

People

(Reporter: gps, Unassigned)

Tracking

Details

(Reporter)

Description

3 years ago
I see the following errors in a local server's log when loading a review request URL for an unpublished review request when not logged in. It /might/ be harmless. But it points at a bug nonetheless.

[Tue Apr 07 16:22:10 2015] [error] WARNING:root:Review Request pk=1 (display_id=1) is not accessible by user AnonymousUser because it has not yet been published.
[Tue Apr 07 16:22:10 2015] [error] ERROR:root:Error rendering TemplateHook <djblets.extensions.hooks.TemplateHook object at 0x7f3eaaad8550>: 'NoneType' object has no attribute 'extra_data'
[Tue Apr 07 16:22:10 2015] [error] Traceback (most recent call last):
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/Djblets-0.8.18-py2.6.egg/djblets/extensions/templatetags/djblets_extensions.py", line 32, in _render_hooks
[Tue Apr 07 16:22:10 2015] [error]     yield hook.render_to_string(request, context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/Djblets-0.8.18-py2.6.egg/djblets/extensions/hooks.py", line 246, in render_to_string
[Tue Apr 07 16:22:10 2015] [error]     RequestContext(request, context))
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/loader.py", line 164, in render_to_string
[Tue Apr 07 16:22:10 2015] [error]     return t.render(Context(dictionary))
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/base.py", line 140, in render
[Tue Apr 07 16:22:10 2015] [error]     return self._render(context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
[Tue Apr 07 16:22:10 2015] [error]     return self.nodelist.render(context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/base.py", line 840, in render
[Tue Apr 07 16:22:10 2015] [error]     bit = self.render_node(node, context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/debug.py", line 78, in render_node
[Tue Apr 07 16:22:10 2015] [error]     return node.render(context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/defaulttags.py", line 298, in render
[Tue Apr 07 16:22:10 2015] [error]     match = condition.eval(context)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/defaulttags.py", line 867, in eval
[Tue Apr 07 16:22:10 2015] [error]     return self.value.resolve(context, ignore_failures=True)
[Tue Apr 07 16:22:10 2015] [error]   File "/venv/lib/python2.6/site-packages/django/template/base.py", line 613, in resolve
[Tue Apr 07 16:22:10 2015] [error]     new_obj = func(obj, *arg_vals)
[Tue Apr 07 16:22:10 2015] [error]   File "/version-control-tools/pylib/mozreview/mozreview/templatetags/mozreview.py", line 12, in isPush
[Tue Apr 07 16:22:10 2015] [error]     return str(aReviewRequest.extra_data.get('p2rb', 'False')).lower() == 'true'
[Tue Apr 07 16:22:10 2015] [error] AttributeError: 'NoneType' object has no attribute 'extra_data'
Priority: -- → P3
(Assignee)

Updated

2 years ago
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.