Commit 07f56596 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[entities] Fix backward compat of IDublinCore adapter wrt dc_long_title

`entity.dc_long_title()` used to fallback to `dc_title()`, and most entity types
were relying on this, thus only implementing the later.

Since introduction of the IDublinCore adapter, if one call
`entity.dc_long_title()` on an entity that only implements `dc_title()`, it will retrieve
the adapter which will then call its own `title()` method instead of the
`dc_title()` method of the entity as expected.

Fix this by calling instead `entity.dc_title()` which will eventually kick in the
backward compat layer if necessary.

branch : 3.25
parent 8a1306c43656
......@@ -49,7 +49,9 @@ class IDublinCoreAdapter(view.EntityAdapter):
def long_title(self):
"""Return a more detailled title for entity"""
return self.title()
# go through entity.dc_title for bw compat purpose: if entity define dc_title but not
# dc_long_title, we still want it to be considered.
return self.entity.dc_title()
def description(self, format='text/plain'):
"""Return a suitable description for entity"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment