From 999e908fef01fe719fc92ecb7dd48744266fd407 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Thu, 10 May 2007 12:11:44 +0000
Subject: [PATCH] Use getattr instead of hasattr.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14438 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Predicate.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/Predicate.py b/product/ERP5/Document/Predicate.py
index 3195985bd3..27853bfad8 100644
--- a/product/ERP5/Document/Predicate.py
+++ b/product/ERP5/Document/Predicate.py
@@ -471,10 +471,10 @@ class Predicate(XMLObject, Folder):
           new_criterion_property_list.append(property)
           property_min = property + '_range_min'
           property_max = property + '_range_max'
-          if hasattr(self,'get%s' % convertToUpperCase(property)) \
+          if getattr(self, 'get%s' % convertToUpperCase(property), None) is not None\
             and self.getProperty(property) is not None:
             identity_criterion[property] = self.getProperty(property)
-          elif hasattr(self,'get%s' % convertToUpperCase(property_min)):
+          elif getattr(self, 'get%s' % convertToUpperCase(property_min), None) is not None:
             min = self.getProperty(property_min)
             max = self.getProperty(property_max)
             range_criterion[property] = (min,max)
-- 
2.30.9