Make it possible to fully delete unlisted/unrated extensions #81

Merged
Anna Sirota merged 24 commits from fully-delete-extension into main 2024-04-19 11:00:19 +02:00
Showing only changes of commit 0c3fbbc980 - Show all commits

View File

@ -258,7 +258,7 @@ class Extension(
mode = not hard and 'soft-' or '' mode = not hard and 'soft-' or ''
for p in previews: for p in previews:
p.delete(hard=hard) p.delete(hard=hard)
log.warning('%(mode)sdeleting preview file pk=% source=%s', mode, p.pk, p.source.name) log.warning('%(mode)sdeleting preview file pk=%s source=%s', mode, p.pk, p.source.name)
for v in versions: for v in versions:
v.delete(hard=hard) v.delete(hard=hard)
log.warning('%(mode)sdeleting extension pk=%s', mode, self.pk) log.warning('%(mode)sdeleting extension pk=%s', mode, self.pk)
@ -567,7 +567,6 @@ class Version(CreatedModifiedMixin, RatingMixin, TrackChangesMixin, SoftDeleteMi
file = self.file file = self.file
mode = not hard and 'soft-' or '' mode = not hard and 'soft-' or ''
args = { args = {
'extension_id': self.extension_id,
'file_id': file.pk, 'file_id': file.pk,
'mode': mode, 'mode': mode,
'source': file.source.name, 'source': file.source.name,