django-csv-export-view icon indicating copy to clipboard operation
django-csv-export-view copied to clipboard

Behavior on non given references

Open frlan opened this issue 1 year ago • 1 comments

Scenario: I wanted to create a easy export view for a list of orders including some data like addresses and bank accounts data etc. Bank account data are stored in a dedicated model so references are used like field = ("order__user__bankaccount") -- However, when there is no bank account connected (which makes sense from model point of view) that I'm running into an error.

Of course I could modify get_queryset() with some if-else-magic -- But honestly I'd like to avoid that and suggesting to add some magic that either keep this fields empty or make it configurable. Something like a left outer join in SQL without a fitting dataset.

frlan avatar Aug 04 '24 10:08 frlan

Thanks for posting this. Could you post the modelling your using the causing the problems. Just a simple version with the relationships. Thanks.

benkonrath avatar Aug 18 '24 15:08 benkonrath

I'm closing this issue due to a lack of follow up. Please reopen it if you're still want to work through it.

benkonrath avatar Nov 04 '24 13:11 benkonrath