diff --git a/product/ERP5/mixin/rule.py b/product/ERP5/mixin/rule.py index 9218b9fae61bd8e9151e1eb0a5b93607b1ac87ec..e1609d5c41d3c650a3f44d5d3fdcb07dbfe836ad 100644 --- a/product/ERP5/mixin/rule.py +++ b/product/ERP5/mixin/rule.py @@ -238,10 +238,7 @@ class RuleMixin(Predicate): delivery = movement.getDeliveryValue() if delivery is None: return False - if len(self.getDivergenceList(movement)) == 0: - return False - else: - return True + return len(self.getDivergenceList(movement)) != 0 security.declareProtected(Permissions.View, 'getDivergenceList') def getDivergenceList(self, movement):