Skip to content

Injected parameters can't be kwargs with defaults #10

@jrdh

Description

@jrdh

Just came across a scenario where I wanted to get hold of the original_data_dict in an action but I wanted to default it to None (i.e. def the_action(original_data_dict=None). If you do this and call the action through CKAN (i.e. through the get_action toolkit function), you get None instead of the original_data_dict parameter value.

This is described in the doc:

To specify these parameters you must include them as args, not kwargs.

but I can't remember whether there was a good reason for that or not. It'd be good to check if this is a technical limitation or something we can open up a bit more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions