From 724c5eddb6669dbbf8a400a5cfade1dbd9db42ee Mon Sep 17 00:00:00 2001 From: poetwang Date: Thu, 23 Aug 2012 01:03:55 +0800 Subject: [PATCH] [api]fix a bug --- api/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/views.py b/api/views.py index 588cdf49b8..1809d20a02 100644 --- a/api/views.py +++ b/api/views.py @@ -284,9 +284,10 @@ class RepoDirPathView(ResponseMixin, View): old_oid = request.GET.get('oid', None) if old_oid and old_oid == dir_id : + response = HttpResponse(json.dumps("uptodate"), status=200, + content_type=json_content_type) response["oid"] = dir_id - return HttpResponse(json.dumps("uptodate"), status=200, - content_type=json_content_type) + return response else: return get_dir_entrys_by_id(request, dir_id)