From d6793a1ce8b61067e1700dcd5533efb6bb4c3f6e Mon Sep 17 00:00:00 2001
From: Andrew Browning <ayleph@thisshitistemp.com>
Date: Fri, 26 Feb 2016 00:45:29 -0500
Subject: [PATCH] Fix issue 5427 fail to delete reported media
This patch undoes a portion of code introduced in 8de5a93 which
attempts to set an illegal object_id to reports for media which are
subsequently deleted.
---
mediagoblin/db/base.py | 8 --------
1 file changed, 8 deletions(-)
diff --git a/mediagoblin/db/base.py b/mediagoblin/db/base.py
index 0f17a3a..849acd8 100644
a
|
b
|
class GMGTableBase(object):
|
122 | 122 | object_id=gmr.id |
123 | 123 | ) |
124 | 124 | notifications.delete() |
125 | | |
126 | | # Set None on reports found |
127 | | reports = Report.query.filter_by( |
128 | | object_id=gmr.id |
129 | | ) |
130 | | for report in reports: |
131 | | report.object_id = None |
132 | | report.save(commit=commit) |
133 | 125 | |
134 | 126 | # Hand off to the correct deletion function. |
135 | 127 | if deletion == self.HARD_DELETE: |