Skip to content

a viewset's action list gets "head" added to it, but only after being called at least once #9747

@rtpg

Description

@rtpg

https://github.com/encode/django-rest-framework/blame/853969c69c815be69513c2f63a41285858a45352/rest_framework/viewsets.py#L106-L107

We didn't have head set in our actions on a viewset, but head would suddenly appear in a viewset's actions, but seemingly randomly.

This way of filling in head in actions means that before you call a viewset at least once, it will have one set of actions, but afterwards it would have another.

This is surprising to me, and I have a hard time imagining it to be the right solution here. But perhaps I am missing a detail.

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