unknown template assumes a distroseries has a product

Bug #648123 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
j.c.sackett

Bug Description

OOPS-1729S273 was caused by a visit to https://blueprints.staging.launchpad.net/debian/squeeze/+specs. This error lookl like it was caused by python in the template. The template should be be making decisions like this. The python logic needs to be moved into the view.

/srv/staging.launchpad.net/staging/launchpad/lib/lp/blueprints/browser/../templates/unknown-specs.pt
   - Line 25, Column 10
   - Expression: <PythonExpr (view.context.product and view.context.product or view.context.distribution)>
   - Names:
      {'args': (),
       'context': <DistroSeries u'squeeze'>,
       'default': <object object at 0x2b2a2d6ac230>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <lp.blueprints.publisher.BlueprintsBrowserRequest instance URL=https://blueprints.staging.launchpad.net/debian/squeeze/+specs>,
       'template': <z3c.ptcompat.ViewPageTemplateFile object at 0x6702050>,
       'view': <zope.browserpage.metaconfigure.HasSpecificationsView object at 0xf7e4450>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0xe653310>}
  Module zope.tales.pythonexpr, line 59, in __call__
    return eval(self._code, vars)
   - __traceback_info__: (view.context.product and view.context.product or view.context.distribution)
  Module <string>, line 1, in <module>
ForbiddenAttribute: ('product', <DistroSeries u'squeeze'>)

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

This has also happened on edge: OOPS-1729EC886

Revision history for this message
Curtis Hovey (sinzui) wrote :

series.parent returns either a product or distribution and might be helpful in this fix.

j.c.sackett (jcsackett)
Changed in blueprint:
assignee: nobody → j.c.sackett (jcsackett)
status: Triaged → Fix Committed
tags: added: qa-ok
Revision history for this message
j.c.sackett (jcsackett) wrote :

This was fixed by another branch related to the unknown-specs template, as shown in the linked branch.

Curtis Hovey (sinzui)
Changed in blueprint:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.