Hi guys, does Prefect's `case` statement for True/...
# prefect-server
k
Hi guys, does Prefect's
case
statement for True/False logic allow me to do something analogos to this python logic:
Copy code
a = get_val_or_none()
if not a:
    a = 'some new val'
do_something_with_a(a)
k
Not quite, you need to use
merge
like:
Copy code
a = get_val_or_none()
with case(a, False):
    b = some_new_task()
c = merge(b,a)
do_something_with_c(c)
merge will give the first non null value
k
understood thank you !