use params=None instead of params={} when dynamically creating action handlers to avoid mutable default arguments