entities/lib.py
changeset 7990 a673d1d9a738
parent 7827 9bbf83f68bcc
child 8930 6a02be304486
equal deleted inserted replaced
7989:db76e8aaec29 7990:a673d1d9a738
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    51     def email_of(self):
    51     def email_of(self):
    52         return self.reverse_use_email and self.reverse_use_email[0] or None
    52         return self.reverse_use_email and self.reverse_use_email[0] or None
    53 
    53 
    54     @property
    54     @property
    55     def prefered(self):
    55     def prefered(self):
    56         return self.prefered_form and self.prefered_form[0] or self
       
    57 
       
    58     @deprecated('[3.6] use .prefered')
       
    59     def canonical_form(self):
       
    60         return self.prefered_form and self.prefered_form[0] or self
    56         return self.prefered_form and self.prefered_form[0] or self
    61 
    57 
    62     def related_emails(self, skipeids=None):
    58     def related_emails(self, skipeids=None):
    63         # XXX move to eemail
    59         # XXX move to eemail
    64         # check email relations are in the schema first
    60         # check email relations are in the schema first