Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5367 closed defect (fixed)

Update edit view for database changes

Reported by: ayleph Owned by:
Priority: blocker Milestone: 0.9.0
Component: programming Keywords: edit, db, migrations
Cc: tsyesika Parent Tickets:

Description

Editing other users' media causes a server error.

Change History (4)

comment:1 by ayleph, 9 years ago

Owner: ayleph removed
Status: newreview

This patch fixes this issue.

From 41f88aa83b385e948e508a98e8aa348c23486161 Mon Sep 17 00:00:00 2001
From: ayleph <ayleph@thisshitistemp.comm>
Date: Sun, 6 Dec 2015 14:54:32 -0500
Subject: [PATCH] Fix issue 5367 Edit view updates

This commit fixes issue 5367 by updating the edit view to be compatible
with recent db migrations.
---
 mediagoblin/edit/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index 8e80b3c..3982820 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -91,7 +91,7 @@ def edit_media(request, media):
             return redirect_obj(request, media)
 
     if request.user.has_privilege(u'admin') \
-            and media.uploader != request.user.id \
+            and media.actor != request.user.id \
             and request.method != 'POST':
         messages.add_message(
             request, messages.WARNING,
-- 
2.6.2

comment:2 by Jessica Tallon, 9 years ago

will review tomorrow

comment:3 by Jessica Tallon, 9 years ago

Resolution: fixed
Status: reviewclosed

This has been reviewed and pushed to master, sorry i took longer than i expected, christmas and new years has been hectic. The commit is e75a45c.

Last edited 9 years ago by Jessica Tallon (previous) (diff)

comment:4 by Christopher Allan Webber, 9 years ago

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

Note: See TracTickets for help on using tickets.