Skip to content

get_relation_fields_from_model crashes django admin in certain cases. #20

@lbrindze

Description

@lbrindze

In our application use case of report builder (running django 1.8, with report_builder 3.2) anytime a call runs through get_relation_fields_from_model and a related field is found (adding it to relation_fields, line 43) it crashes the admin because line 42 changes state on the actual ManyToOneRel object.

I have a fix for this, it simply involves copying the original object (found in the field[0]) before renaming it. Reports still run, and my admin doesn't crash.

Let me know if this is a verified issue, and if I should submit the PR.

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