[PATCH eac] [entities] Fix dumb attribute error

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Apr 14 15:32:14 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1492176605 -7200
#      Fri Apr 14 15:30:05 2017 +0200
# Node ID db9830233850a5c9f8ba3216101a254d69136cf5
# Parent  95731cf6334ca719a3ef0cac0740bce8715510bc
[entities] Fix dumb attribute error

agent has been renamed to record since we extracted eac from saem_ref.

diff --git a/cubicweb_eac/entities.py b/cubicweb_eac/entities.py
--- a/cubicweb_eac/entities.py
+++ b/cubicweb_eac/entities.py
@@ -121,11 +121,11 @@ class EACResourceRelation(AnyEntity):
     @property
     def resource(self):
         return self.resource_relation_resource[0]
 
     def dc_title(self):
-        agent_title = self.agent.dc_title()
+        agent_title = self.record.dc_title()
         if self.agent_role:
             agent_title += u' (%s)' % self.printable_value('agent_role')
         resource_title = self.resource.dc_title()
         if self.resource_role:
             resource_title += u' (%s)' % self.printable_value('resource_role')


More information about the saem-devel mailing list