akolpakov / django-unused-media

Remove unused media files from Django project
MIT License
124 stars 24 forks source link

use base manager for queries to prevent missing objects #31

Closed mgaller closed 4 years ago

mgaller commented 5 years ago

In my case, the default object manager is overwritten so that "deleted" files do not occur in it, but they should also be considered.

akolpakov commented 5 years ago

Can you bring your example in details?

Because your PR will lead to unexpected deletions. For example: I have Model with images and active field. And I created my own default manager which shows only active = True items.

With your PR, all images assigned to inactive items will be removed. I think it would be unexpected behaviour.

akolpakov commented 4 years ago

37