#527: AttributeError rendering TicketQuery widget
---------------------------+--------------------------------
Reporter: olemis | Owner:
Type: defect | Status: review
Priority: critical | Milestone: Release 6
Component: multiproduct | Version:
Resolution: | Keywords: ProductTicketQuery
---------------------------+--------------------------------
Comment (by rjollos):
I could immediately produce the traceback in comment:3 by placing the call
to the `Widget` macro on WikiStart. The only way that I've been able to
reproduce the traceback in comment:description is to set the product for a
ticket that appears in a query on the Dashboard to `Null`, by directly
editing the database. In that case, I get:
{{{
#!sh
10:40:13 PM Trac[web_ui] ERROR: - 4ce868fb-9cbe-46dd-925e-aed660dfd90d -
Error rendering widget TicketQuery with options {'args': {'max': 10,
'query':
'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone',
'title': 'Active Tickets'}}
Traceback (most recent call last):
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_dashboard/bhdashboard/web_ui.py",
line 269, in _render_widget
return wp.render_widget(name, ctx, options)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_dashboard/bhdashboard/util.py",
line 132, in widget_name_checker
return f(self, name, *args, **kwargs)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_dashboard/bhdashboard/widgets/query.py",
line 102, in render_widget
data = qrymdl.process_request(fakereq)[1]
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 229, in process_request
return self.display_html(req, query)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 241, in display_html
tickets = query.execute(req)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 127, in execute
row[product_idx], val)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 71, in _get_ticket_href
product_env = ProductEnvironment(self.env, prefix)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/cache.py",
line 67, in wrapper
result = user_function(*args, **kwds)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
line 379, in __call__
return ComponentMeta.__call__(self, *args, **kwargs)
File "/home/user/Workspace/bh526/bloodhound/trac/trac/core.py", line
140, in __call__
self.__init__(*args, **kwargs)
File "/home/user/Workspace/bh526/bloodhound/trac/trac/core.py", line
107, in new_init
original_init(self, *args, **kwargs)
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
line 534, in __init__
self.setup_config()
File
"/home/user/Workspace/bh526/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
line 787, in setup_config
self.config = Configuration(self.parent, self.product.prefix, parents)
AttributeError: 'NoneType' object has no attribute 'prefix'
}}}
How does one end up with the product for a ticket resource being `Null`
without directly editing the database?
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/527#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker