You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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....
The text was updated successfully, but these errors were encountered:
I'm happy so long as we support 1.8 (or whatever is LTS). The model introspection api was hacky prior to 1.8 and we've found other bugs trying to support both.
I thought django-report-utils was merged into django-report-builder. @bufke hasn't report_to_csv moved?
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....
The text was updated successfully, but these errors were encountered: