Skip to content

Use repr for an Attribute value #50

@KommuSoft

Description

@KommuSoft

For string values for attributes, for example on a GenericAPIView, it uses:

lookup_field = pk

(see https://www.cdrf.co/3.7/rest_framework.generics/GenericAPIView.html )

It thus fails to perform a repr over the item and thus displays it as a variable. We can use repr to show this as:

lookup_field = 'pk'

instead.

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