[Erp5-report] r42220 jerome - /erp5/trunk/products/ERP5/Document/BalanceTransaction.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 11 17:10:53 CET 2011
Author: jerome
Date: Tue Jan 11 17:10:53 2011
New Revision: 42220
URL: http://svn.erp5.org?rev=42220&view=rev
Log:
It is wrong to compare keys, as ordering is unspecified. Use sorted instead
Modified:
erp5/trunk/products/ERP5/Document/BalanceTransaction.py
Modified: erp5/trunk/products/ERP5/Document/BalanceTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BalanceTransaction.py?rev=42220&r1=42219&r2=42220&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] Tue Jan 11 17:10:53 2011
@@ -67,7 +67,7 @@ class InventoryKey(UserDict):
def __cmp__(self, other):
# this is basically here so that we can see if two inventory keys are
# equals.
- if tuple(self.keys()) != tuple(other.keys()):
+ if sorted(self.keys()) != sorted(other.keys()):
return -1
for k, v in self.items():
if v != other[k]:
More information about the Erp5-report
mailing list