Steps to reproduce:
- Create a model,
PrivateModel and set one field as PrivateFileField
- Create another model, say
TestModel and reference PrivateModel as a foreign key
- Run migrations and set up django admin for
TestModel keeping PrivateModel as inline
- Create a test instance for both the models
- Go to the
PRIVATE_STORAGE_ROOT path and manually delete the file associated with newly created TestModel instance
- Now delete that instance using django admin page (by marking the inline for deletion)
Expected outcome:
The PrivateModel instance marked for deletion is removed and TestModel instance is updated successfully
Actual Outcome:
Throws FileNotFoundError