euphorie / Euphorie

Euphorie is a tool for risk assessment
https://pythonhosted.org/Euphorie/
GNU General Public License v2.0
11 stars 6 forks source link

Populate link “Find an OSH consultant” #586

Closed reinhardt closed 1 year ago

reinhardt commented 1 year ago

syslabcom/scrum#1164

ale-rt commented 1 year ago

What is content expected to be? I suppose a euphorie.page.

If yes please check https://github.com/euphorie/Euphorie/pull/587.

It was necessary to me toactually display this page without having a:

  Module Products.CMFDynamicViewFTI.browserdefault, line 88, in __call__
RecursionError: maximum recursion depth exceeded in comparison
reinhardt commented 1 year ago

I've updated the code to use the help folder inside the country, see https://github.com/syslabcom/scrum/issues/1227

Originally the objects were meant to be ZMI file objects, but now they are indeed expected to be euphorie.page objects. I now return the body directly which avoids the recursion issue.

reinhardt commented 1 year ago

I know exactly where the objects are, so there is no need to find them.

Any reason why I should use the portal catalog?

ale-rt commented 1 year ago

I know exactly where the objects are, so there is no need to find them.

Any reason why I should use the portal catalog?

Because you are iterating over objectValues and that can be potentially lots of objects to wake up before you get the proper one. In addition, there are security quirks.

That should be just a minor problem in a real world scenario, in fact I approved the PR.

Just consider these remarks for the next time.

reinhardt commented 1 year ago

Great, thanks for elaborating.