From 424358be8aee2e281b9f299ea2b1b786c8e08e9e Mon Sep 17 00:00:00 2001 From: Alexandre Boeglin <alex@nexedi.com> Date: Tue, 19 Sep 2006 12:41:46 +0000 Subject: [PATCH] print a log message when setting a property fails in setVariationPropertyDict git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10164 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Amount.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/Amount.py b/product/ERP5/Document/Amount.py index c322996f48..33a5529d20 100644 --- a/product/ERP5/Document/Amount.py +++ b/product/ERP5/Document/Amount.py @@ -306,7 +306,12 @@ class Amount(Base, Variated): raise KeyError, "Can not set the property variation '%s'" % \ property_id else: - self.setProperty(property_id, property_value) + try: + self.setProperty(property_id, property_value) + except KeyError: + LOG("Amount", 200, "Can not set %s with value %s on %s" % \ + (property_id, property_value, self.getRelativeUrl())) + raise security.declareProtected(Permissions.AccessContentsInformation, 'getQuantityUnitRangeItemList') -- 2.30.9