Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_relation_fields_from_model crashes django admin in certain cases. #20

Open
lbrindze opened this issue Oct 9, 2015 · 3 comments
Open

Comments

@lbrindze
Copy link

lbrindze commented Oct 9, 2015

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.

@smwise
Copy link

smwise commented Jul 22, 2016

Did anyone ever take a look at this? The same issue is open for django-report-builder. I was going to take the same approach, copy (so as to not change the rest of the logic at all), but don't want to duplicate effort if someone else already has a PR ready.

@bufke
Copy link
Member

bufke commented Jul 23, 2016

@smwise I'm not aware of anyone working on this. It would be good to include a unit test in any pull request to clearly demonstrate the problem since it's a bit confusing.

@bufke
Copy link
Member

bufke commented Jul 23, 2016

Also if you wanted to help out I think it would make sense to just move this functionality to report builder itself. I don't use this project anymore - it was originally it's own git repo because it was used by some other tools I made - but those tools are no longer maintained and never got popular as report builder has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants