mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-22 05:49:59 +03:00
Update decorators.py
This commit is contained in:
parent
c73a8f08e2
commit
14d6941390
|
@ -15,7 +15,7 @@ def either(expected):
|
|||
if not any(arg_list):
|
||||
raise TooFewArgs("Too few arguments, must be either of: " + ",".join(expected))
|
||||
|
||||
if all(arg_list):
|
||||
if all(arg_list) or arg_list.count(True) > 1:
|
||||
raise TooManyArgs("Too many arguments, must be either of: " + ",".join(expected))
|
||||
|
||||
return func(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user