Commit eae68100 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

fixup! py2/py3: dict_key does not have sort().

parent b6104d94
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
# #
############################################################################## ##############################################################################
from Products.ERP5Type.Utils import ensure_list
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
...@@ -319,8 +317,7 @@ class ImmobilisableItem(Item, Amount): ...@@ -319,8 +317,7 @@ class ImmobilisableItem(Item, Amount):
Returns a list of dictionaries representing immobilisation periods for the object Returns a list of dictionaries representing immobilisation periods for the object
from_date is included, to_date is excluded from_date is included, to_date is excluded
""" """
kw_key_list = kw.keys() kw_key_list = sorted(kw.keys())
kw_key_list.sort()
if kw_key_list.count('immo_cache_dict'): if kw_key_list.count('immo_cache_dict'):
kw_key_list.remove('immo_cache_dict') kw_key_list.remove('immo_cache_dict')
immo_cache_dict = kw.get('immo_cache_dict', {'period':{}, immo_cache_dict = kw.get('immo_cache_dict', {'period':{},
...@@ -780,8 +777,7 @@ class ImmobilisableItem(Item, Amount): ...@@ -780,8 +777,7 @@ class ImmobilisableItem(Item, Amount):
""" """
if at_date is None: if at_date is None:
at_date = DateTime() at_date = DateTime()
kw_key_list = ensure_list(kw.keys()) kw_key_list = sorted(kw.keys())
kw_key_list.sort()
if kw_key_list.count('immo_cache_dict'): if kw_key_list.count('immo_cache_dict'):
kw_key_list.remove('immo_cache_dict') kw_key_list.remove('immo_cache_dict')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment