aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/federation/views.py
diff options
context:
space:
mode:
authorJessica Tallon <jessica@megworld.co.uk>2014-12-16 12:05:18 +0000
committerJessica Tallon <jessica@megworld.co.uk>2014-12-16 12:05:18 +0000
commit9e715bb07f9a09f5594ed865d3dbd204c71feb50 (patch)
tree822f4d098b5f1f98caf9217166d491199d69e450 /mediagoblin/federation/views.py
parent9a51bf1ebcee16169c7dc8ab950b23f7b4a06a22 (diff)
downloadmediagoblin-9e715bb07f9a09f5594ed865d3dbd204c71feb50.tar.lz
mediagoblin-9e715bb07f9a09f5594ed865d3dbd204c71feb50.tar.xz
mediagoblin-9e715bb07f9a09f5594ed865d3dbd204c71feb50.zip
Fix #1077 - Fix updating comment via API and add test
Diffstat (limited to 'mediagoblin/federation/views.py')
-rw-r--r--mediagoblin/federation/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/federation/views.py b/mediagoblin/federation/views.py
index 69dee7fb..5b10fb5b 100644
--- a/mediagoblin/federation/views.py
+++ b/mediagoblin/federation/views.py
@@ -360,9 +360,9 @@ def feed_endpoint(request, outbox=None):
status=403
)
- if not comment.unserialize(data["object"]):
+ if not comment.unserialize(data["object"], request):
return json_error(
- "Invalid 'comment' with id '{0}'".format(obj_id)
+ "Invalid 'comment' with id '{0}'".format(obj["id"])
)
comment.save()
@@ -382,7 +382,7 @@ def feed_endpoint(request, outbox=None):
image = MediaEntry.query.filter_by(id=obj_id).first()
if image is None:
return json_error(
- "No such 'image' with the id '{0}'.".format(obj_id)
+ "No such 'image' with the id '{0}'.".format(obj["id"])
)
# Check that the person trying to update the comment is