django-db-prefix
django-db-prefix copied to clipboard
duplicated prefix name because of abstract model
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.
you have to add condition when checking existence of prefix not sender._meta.db_table.startswith(prefix)