How to set default value for function (python server) argument


#1

I defined my function as the following

@py(env="XXX")
func: function(A: string, B: boolean = false)

def func(A, B=False):
  pass

Provision is fine. Calling MyType.func("hello") is fine.

Calling MyType.func("hello", true) returns error :

"Function "func" on MyType takes one argument. [InvalidInputParam]"


#2

Hi
Can you tell me the server version you are working on? I was not able to replicate your issue on the latest c3-server version.


#3

This works. The error is unrelated.