Skip to content

Defer evaluation of defaults for ObjectTypeField #4

@pi-sigma

Description

@pi-sigma

The defaults for the ObjectTypeField are retrieved with a request to the Objecttypes API. This creates a problem for certain use cases. In OIP, ObjectTypeField is set set on a Django CMS plugin, with the effect that the field is evaluated immediately when the class is imported (rather than when the form is constructed, where the default values for the field are actually needed). This makes testing difficult because it is impossible (?) to mock out the relevant request.

To be determined if this should be fixed in the library or in the client (e.g. OIP).

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