django-db-prefix icon indicating copy to clipboard operation
django-db-prefix copied to clipboard

duplicated prefix name because of abstract model

Open ReadMost opened this issue 3 years ago • 1 comments

Your code does not consider abstract=True models. In the case when one model inherits from an abstract model its name will have duplicated prefixes as foo_foo_model_name.

ReadMost avatar Sep 22 '21 06:09 ReadMost

you have to add condition when checking existence of prefix not sender._meta.db_table.startswith(prefix)

ReadMost avatar Sep 22 '21 06:09 ReadMost