[FIX] *: leftover invalid uses of pycompat
This commit is contained in:
@@ -209,7 +209,7 @@ class IrHttp(models.AbstractModel):
|
||||
@classmethod
|
||||
def _postprocess_args(cls, arguments, rule):
|
||||
""" post process arg to set uid on browse records """
|
||||
for key, val in list(pycompat.items(arguments)):
|
||||
for key, val in list(arguments.items()):
|
||||
# Replace uid placeholder by the current request.uid
|
||||
if isinstance(val, models.BaseModel) and isinstance(val._uid, RequestUID):
|
||||
arguments[key] = val.sudo(request.uid)
|
||||
|
||||
@@ -77,7 +77,7 @@ def float_round(value, precision_digits=None, precision_rounding=None, rounding_
|
||||
epsilon = 2**(epsilon_magnitude-53)
|
||||
if rounding_method == 'HALF-UP':
|
||||
normalized_value += math.copysign(epsilon, normalized_value)
|
||||
rounded_value = pycompat.round(normalized_value) # round to integer
|
||||
rounded_value = round(normalized_value) # round to integer
|
||||
|
||||
# TIE-BREAKING: UP (for ceiling operations)
|
||||
# When rounding the value up, we instead subtract the epsilon value
|
||||
|
||||
Reference in New Issue
Block a user