Open benzkji opened 2 months ago
I'm not sure.
Do you get this error when you disable django-modeltranslation?
I'm not sure, will try.
Indeed, if I disable translation on one of the translated models, deletion is possible. I'll try to write a test, seems like a very edge case.
please see PR, need directions for adding migrations :)
The PR: #729
I have a abstract
Link
base class, used for myTeaser
andContentNav
models. The base class has a fieldfile
, that is then translated in each of the real classes. The file field is aFileField
from django-filer, so basically aForeignKey
.When I try to delete a
File
instance, I get aTypeError / Cannot combine queries on two different base models.
from django itself. Thefile
field is configured ason_delete=models.SET_NULL
, and as far as I can tell, the error happens because django wants to update all the needed foreign key fields, but somehow gets two querysets of different models (the two translated above) to combine and update. Why exactly is very hard to tell.Has this happend before? I'll try to write a test, to rebuild the error - it currently happens in an old project, that was updated several times.