Skip to content

Commit

Permalink
Fix mutually_exclusive() use of at_least_one()
Browse files Browse the repository at this point in the history
  • Loading branch information
allegroai committed Jan 27, 2020
1 parent 9f8e814 commit 7b9e740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trains/backend_interface/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def mutually_exclusive(_exception_cls=Exception, _require_at_least_one=True, _ch
""" Helper for checking mutually exclusive options """
actual = [k for k, v in kwargs.items() if (v is not None if _check_none else v)]
if _require_at_least_one:
at_least_one(_exception_cls=_exception_cls, **kwargs)
at_least_one(_exception_cls=_exception_cls, _check_none=_check_none, **kwargs)
if len(actual) > 1:
raise _exception_cls('Only one of (%s) is allowed' % ', '.join(kwargs.keys()))

Expand Down

0 comments on commit 7b9e740

Please sign in to comment.