`render_resource_link` should add the "missing" class if the resource doesn't exist
|Reported by:||Owned by:||Ryan J Ollos|
Added assertion with error message to check that the first argument to
In the case that
get_resource_description doesn't return an
render_resource_link should check whether the resource exists and add the
missing class if it doesn't.
This is mainly useful for plugins at the moment, since
render_resource_link is only utilized once in the Trac source. In this one case that it is used, a
context parameter is passed, so an
Element will be returned by
render_resource_link and the pathway that this ticket proposes to modify is not being executed in that case.
I've prepared a patch in ff9c10ec. I don't like how the test case adds a dependency on
trac.wiki.model.WikiPage, but I didn't have any better ideas at the moment and struggled to figure out the right way to code a "dummy"
ResourceManager. I'll iterate on the patch if anyone can provide suggestions on how to improve.
Change History (8)
comment:4 by , 7 years ago
|API Changes:||modified (diff)|
|Status:||assigned → closed|