basxsoftwareassociation / bread

Engine to create database applications based on Django and the IBM Carbon Design System
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

fix: remove the use of get_concrete_instance #87

Closed saemideluxe closed 2 years ago

saemideluxe commented 2 years ago

This is not necessary in many places, instead the newly added InheritanceManager should be used since it will fetch all concrete instances in a single query.

saemideluxe commented 2 years ago

get_concrete_instance is still in use in some places, but the most concerning one is the use of it browse-views. Single uses are less serious and in case of e.g. bread.utils.urls.reverse_model also quite usefull. But maybe we should remove it even there, just to prevent accidental use of it.

wipascal commented 2 years ago

Hmm in this PR I don't see a usage of the code in inheritancemanager.py How to use it?

saemideluxe commented 2 years ago

See here: https://github.com/basxsoftwareassociation/basxconnect/pull/173

(or direct to diff: https://github.com/basxsoftwareassociation/basxconnect/pull/173/files )