is_staff is a bool, not callable

This commit is contained in:
Sanj 2012-10-05 17:30:05 +05:30
parent 8d2b681661
commit 7019c75d08

View File

@ -87,7 +87,7 @@ def stops(request):
def stop(request, slug):
srid = int(request.GET.get("srid", 4326))
if request.POST and request.POST.has_key('geojson'):
if not request.user.is_staff():
if not request.user.is_staff:
return render_to_json_response({'error': 'No permission'})
if not slug:
stop = Stop() #FIXME: should this return an error instead?