Fix bdo's encoding attribute, it's not mandatory
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 Oct 2016 12:04:59 +0200
changeset 1947 bc3703b8278f
parent 1946 b73e68a968a9
child 1948 52a312af8f19
Fix bdo's encoding attribute, it's not mandatory
entities/custom.py
--- a/entities/custom.py	Thu Oct 20 13:59:23 2016 +0200
+++ b/entities/custom.py	Fri Oct 21 12:04:59 2016 +0200
@@ -63,7 +63,7 @@
 
     @property
     def encoding(self):
-        return self.reverse_seda_encoding_from[0]
+        return self.reverse_seda_encoding_from[0] if self.reverse_seda_encoding_from else None
 
     @property
     def referenced_by(self):