Skip to content

Decorator @action removes original function metadata #1411

Open
@aleksandrberlin

Description

@aleksandrberlin

What version of Unfold are you using?

0.50.0

What version of Django are you using?

5.2.3

What browser are you using?

No browser involved

Did you checked changelog/commit history, if the bug is not already fixed?

Yes

Did you searched other issues, if the bug is not already fixed?

Yes

Did you checked documentation?

Yes

Are you able to replicate the bug in the demo site?

No, because no access to code

Repository with reproduced bug

Create minimal repository where it is possible to reproduce an error.

Describe your issue

When using @action decorator I am unable to retrieve original function signature, because decorator substitutes original function with inner without preserving all metadata. I suggest adding decorator functools.wraps(func) to inner function in @action decorator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions