From 2a07e2a1ab46163b91f48db8e9c2fc5b54f350f3 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 26 Feb 2016 11:15:29 +0000 Subject: [PATCH] Remove redundant overrides of Model.delete Both of these models have pre_delete handlers which do the same things, so I think these are unnecessary. --- pandora/archive/models.py | 4 ---- pandora/item/models.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 6fe4b2c2..0d28aa38 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -525,10 +525,6 @@ class File(models.Model): status[name] = u'queued' return status - def delete(self, *args, **kwargs): - self.delete_files() - super(File, self).delete(*args, **kwargs) - def delete_frames(self): frames = os.path.join(settings.MEDIA_ROOT, self.get_path('frames')) if os.path.exists(frames): diff --git a/pandora/item/models.py b/pandora/item/models.py index 0fd1eae8..9ae93c78 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -436,10 +436,6 @@ class Item(models.Model): if os.path.exists(path): shutil.rmtree(path) - def delete(self, *args, **kwargs): - self.delete_files() - super(Item, self).delete(*args, **kwargs) - def merge_with(self, other, save=True): ''' move all related tables to other and delete self