Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tryton/tryton/pyson.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,10 @@ def eval(dct, context):

class TimeDelta(PYSON):

def __init__(self, days=0, seconds=0, microseconds=0):
def __init__(self, days=0, seconds=0, microseconds=0, **kwargs):
days = kwargs.get('d', days)
seconds = kwargs.get('s', seconds)
microseconds = kwargs.get('m', microseconds)
Comment on lines +727 to +729
Copy link
Collaborator

@nicoe nicoe Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est une extension coopengo l'utilisation de dsm ?
Si oui je mettrais en [CUSTOM] plutôt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas que je sache, il y a la même chose pour DateTime, et c'est du standard.

for i in [days, seconds, microseconds]:
if isinstance(i, PYSON):
assert i.types().issubset({int, float}), \
Expand Down