[entities] Project.recommends may not exist (it's defined in cubicweb-forge) draft
authorDavid Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 16:47:05 +0100
changeset 1761 0c0c9c026299
parent 1760 db82548222eb
child 1762 f3f5638439f2
[entities] Project.recommends may not exist (it's defined in cubicweb-forge)
entities.py
--- a/entities.py	Fri Nov 14 12:55:15 2014 +0100
+++ b/entities.py	Thu Nov 13 16:47:05 2014 +0100
@@ -168,7 +168,7 @@
         result = []
         if self.project:
             # XXX include recommends?
-            for dp in chain(self.project.uses, self.project.recommends):
+            for dp in chain(self.project.uses, getattr(self.project, 'recommends', ())):
                 # use getattr since for instance ExternalProject has no apycot
                 # environment relation
                 for dpe in getattr(dp, 'has_apycot_environment', ()):