Opened 4 months ago

Last modified 4 months ago

#21707 new Cleanup/optimization

Uninformative error if block.super is used inside the block tag of a base template

Reported by: mitar Owned by: nobody
Component: Template system Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If block.super is used inside the block tag of a base template, an uninformative error is thrown:

'BlockNode' object has no attribute 'context'

It is thrown in super method when doing:

render_context = self.context.render_context

I think code should check for missing self.context and throw a more informative exception.

Attachments (0)

Change History (1)

comment:1 Changed 4 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.4 to master

Add Comment

Modify Ticket

Change Properties
<Author field>
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.