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

cleanup

parent 7da2db17d61e
"""entity classes for entity types provided by the cubicweb email package
:organization: Logilab
:copyright: 2003-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:copyright: 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
......
"""entity/relation schemas to store email in an cubicweb instance
:organization: Logilab
:copyright: 2006-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:copyright: 2006-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
......@@ -10,11 +10,8 @@ _ = unicode
# pylint: disable-msg=E0611,F0401
from yams.buildobjs import (SubjectRelation, RelationType, EntityType,
String, Datetime, Int, RelationDefinition)
try:
from yams.reader import context
defined_types = context.defined
except ImportError:
pass
from yams.reader import context
from cubicweb.schema import ERQLExpression
......@@ -82,7 +79,7 @@ class generated_by(RelationType):
object = 'Email'
# if comment is installed
if 'Comment' in defined_types:
if 'Comment' in context.defined:
class comment_generated_by(RelationDefinition):
subject = 'Comment'
name = 'generated_by'
......
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