return self, not None, when no prefered form 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 14 Sep 2009 12:48:40 +0200
branch3.5
changeset 3207 2516324401dd
parent 3206 5a51ac97f1d3
child 3208 11b84e3b9458
return self, not None, when no prefered form
entities/lib.py
--- a/entities/lib.py	Mon Sep 14 12:48:25 2009 +0200
+++ b/entities/lib.py	Mon Sep 14 12:48:40 2009 +0200
@@ -39,7 +39,7 @@
 
     @property
     def prefered(self):
-        return self.prefered_form and self.prefered_form[0] or None
+        return self.prefered_form and self.prefered_form[0] or self
 
     @deprecated('use .prefered')
     def canonical_form(self):