[Erp5-dev] resolveCategory and category 'format'

bartek bartek at erp5.pl
Fri Jun 6 14:31:57 CEST 2008


Yoshinori Okuji wrote:
> On Monday 02 June 2008 16:34:35 Mikolaj Antoszkiewicz wrote:
>> Hi All,
>>
>> I noticed that portal_categories when asked to resolve 'format' category
>> throws an Exception when that category is not present.
>> I also found that:
>> portal.restrictedTraverse*('portal_categories/format') = 'text/html'
>> I guess that's acquisition working.
>>
>> Of course, when such category exists everything is all right.
>>
>> That would probably require a patch on CategoryTool, but I cannot supply
>> one right now. If anybody has any idea how to nicely 'resolve' that I'd
>> be happy to hear.
> 
> When a category is not present, how do you want to resolve it?
> 

If I get it right, the issue is not that the non-existent category can
not be resolved - this is quite all right. The issue is the
restrictedTraverse returns a string when it should raise an exception.

Bartek

> YO


-- 
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"



More information about the Erp5-dev mailing list