Backport trash can navigation link resolution fix, GitLab issue #331. Thanks to @DocCyblade for the report.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
- Backport resize transformation math operation fix (GitLab #319).
|
||||
- Update Pillow to 3.1.2 (Security fix).
|
||||
- Backport zoom transformation performance improvement (GitLab #334).
|
||||
|
||||
- Backport trash can navigation link resolution fix (GitLab #331).
|
||||
|
||||
2.1.4 (2016-10-28)
|
||||
==================
|
||||
|
||||
@@ -19,6 +19,7 @@ Other changes
|
||||
- https://pillow.readthedocs.io/en/3.4.x/releasenotes/3.1.2.html
|
||||
|
||||
- Backport zoom performance improvement (GitLab #334).
|
||||
- Backport trash can navigation link resolution fix (GitLab #331).
|
||||
|
||||
|
||||
Removals
|
||||
@@ -75,6 +76,7 @@ Bugs fixed or issues closed
|
||||
===========================
|
||||
|
||||
* `GitLab issue #319 <https://gitlab.com/mayan-edms/mayan-edms/issues/319>`_ TransformationResize issue with very "long" image
|
||||
* `GitLab issue #331 <https://gitlab.com/mayan-edms/mayan-edms/issues/331>`_ Trash List View: Items actions should be limited
|
||||
* `GitLab issue #334 <https://gitlab.com/mayan-edms/mayan-edms/issues/334>`_ Perfomance improvment: prevent unnecessary image.resize in TransformationZoom
|
||||
|
||||
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
||||
|
||||
@@ -126,19 +126,19 @@ class Menu(object):
|
||||
|
||||
for bound_source, links in self.bound_links.iteritems():
|
||||
try:
|
||||
if inspect.isclass(bound_source) and type(resolved_navigation_object) == bound_source:
|
||||
for link in links:
|
||||
resolved_link = link.resolve(
|
||||
context=context,
|
||||
resolved_object=resolved_navigation_object
|
||||
)
|
||||
if resolved_link:
|
||||
resolved_links.append(resolved_link)
|
||||
# No need for further content object match testing
|
||||
break
|
||||
else:
|
||||
if inspect.isclass(bound_source):
|
||||
if type(resolved_navigation_object) == bound_source:
|
||||
for link in links:
|
||||
resolved_link = link.resolve(
|
||||
context=context,
|
||||
resolved_object=resolved_navigation_object
|
||||
)
|
||||
if resolved_link:
|
||||
resolved_links.append(resolved_link)
|
||||
# No need for further content object match testing
|
||||
break
|
||||
elif hasattr(resolved_navigation_object, 'get_deferred_fields') and resolved_navigation_object.get_deferred_fields() and isinstance(resolved_navigation_object, bound_source):
|
||||
# Second try for objects using .defer() or .only()
|
||||
if inspect.isclass(bound_source) and isinstance(resolved_navigation_object, bound_source):
|
||||
for link in links:
|
||||
resolved_link = link.resolve(
|
||||
context=context,
|
||||
|
||||
Reference in New Issue
Block a user