We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 96a7457 + dcc1f28 commit 3f237d8Copy full SHA for 3f237d8
binary_database_files/storage.py
@@ -142,9 +142,10 @@ def delete(self, name):
142
name = self.get_instance_name(name)
143
try:
144
models.File.objects.get_from_name(name).delete()
145
- hash_fn = utils.get_hash_fn(name)
146
- if os.path.isfile(hash_fn):
147
- os.remove(hash_fn)
+ if _settings.DB_FILES_AUTO_EXPORT_DB_TO_FS:
+ hash_fn = utils.get_hash_fn(name)
+ if os.path.isfile(hash_fn):
148
+ os.remove(hash_fn)
149
except models.File.DoesNotExist:
150
pass
151
localpath = self._path(name)
0 commit comments