From 0d96fc6d6f775a104c258897e33fa1c3695644c7 Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 1 Sep 2011 08:53:22 +0530 Subject: [PATCH] minor ups --- gazetteer/places/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazetteer/places/views.py b/gazetteer/places/views.py index 54c528d..05dc0fe 100644 --- a/gazetteer/places/views.py +++ b/gazetteer/places/views.py @@ -134,7 +134,7 @@ def add_relation(request): relation = request.GET.get("relation", None) if feature1 == None or feature2 == None or relation == None: #TODO: split up errors :/ -- not imp. return render_to_json_response({'error': 'bad request'}) - if not request.user.is_staff(): + if not request.user.is_staff: return render_to_json_response({'error': 'insufficient permissions error. try logging in again? are you staff / admin?'}) #TODO: handle saving m2m between feature1 and feature2 with relation. If relation='', either remove existing relation between feature1 and feature2, or ignore if no such existing relation exists. BIG QUESTION: Here it can also deal with is_primary logic - if it sets stuff to is_primary or not, though, this needs to be conveyed to the front-end / a logic figured out to toggle the check-boxes display.