[PATCH 6 of 9 saem_ref] [eac] Drop useless adaptable predicate

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 17:38:21 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489674616 -3600
#      Thu Mar 16 15:30:16 2017 +0100
# Node ID 0b28ac3950d4b14eefd3661819a50f357e5a106a
# Parent  5c08296ca40fd3af40aad181097d9ade65cd0023
[eac] Drop useless adaptable predicate

we know AuthorityRecord adapt to ICalendarable, no need to check for it in
predicates.

diff --git a/cubicweb_saem_ref/views/authorityrecord.py b/cubicweb_saem_ref/views/authorityrecord.py
--- a/cubicweb_saem_ref/views/authorityrecord.py
+++ b/cubicweb_saem_ref/views/authorityrecord.py
@@ -22,11 +22,11 @@ from logilab.mtconverter import xml_esca
 
 from cubicweb import tags, _
 from cubicweb.utils import json_dumps, make_uid, JSString
 from cubicweb.uilib import cut, js
 from cubicweb.view import EntityView
-from cubicweb.predicates import adaptable, has_related_entities, is_instance, match_kwargs
+from cubicweb.predicates import has_related_entities, is_instance, match_kwargs
 from cubicweb.web import formfields as ff, formwidgets as fw
 from cubicweb.web.views import tabs, uicfg
 
 from cubes.relationwidget import views as rwdg
 
@@ -684,11 +684,11 @@ class ChronologicalRelationView(EntityVi
 
 
 class AuthorityRecordTimelineJsonView(EntityView):
     """JSON view for agent with chronological relations to be used with vtimeline view."""
     __regid__ = 'saem.authorityrecord-timeline-json'
-    __select__ = adaptable('ICalendarable') & is_instance('AuthorityRecord')
+    __select__ = is_instance('AuthorityRecord')
     template = False
     content_type = 'application/json'
     binary = True
 
     headers = {


More information about the saem-devel mailing list