Hey guys, i have 2 parameters that at least one sh...
# prefect-community
f
Hey guys, i have 2 parameters that at least one should be provided. Prefect have a built-in function to handle this case or should i create a task and validate inside? Thanks!
k
We don’t have a built-in function for that. I think you’d need to make your own task that raises a Failed state
f
Great! Thanks Kevin!! Is like a required_if
k
Copy code
@task
def one_of(x, y):
    if (x or y) == None:
        raise FAIL()
    return
like that? I dunno 😆