Skip to content

Error for proxy models. #25

@AMongeMoreno

Description

@AMongeMoreno

When trying to generate reports that include a model that is marked as proxy=True, the api seems to fail.

I found the fix (it all comes to using ContentType.objects.get_for_model with the parameter for_concrete_model set to False, so ContentType for proxy models are also retrieved)

Furthermore, there are other related bugs in model introspection util functions, as fields from proxy models are not retrieved using the meta method get_all_field_names() (get_fields() must be used instead). However this fix might break retro compatibility ...

If you want I can make a pull request....

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