1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 11:57:34 +00:00

Fix a few bugs

This commit is contained in:
zhengxie
2014-07-01 16:35:11 +08:00
parent 3a5ef8bfda
commit 5696add80a
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
import datetime
import simplejson as json
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.http import HttpResponseRedirect, Http404, HttpResponse
@@ -8,8 +8,6 @@ from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
import seaserv
from seahub.auth.decorators import login_required, login_required_ajax
from seahub.notifications.models import Notification, NotificationForm, \
UserNotification

View File

@@ -1341,6 +1341,9 @@ def set_notice_seen_by_id(request):
@login_required_ajax
def repo_remove(request, repo_id):
ct = 'application/json; charset=utf-8'
result = {}
if get_system_default_repo_id() == repo_id:
result['error'] = _(u'System library can not be deleted.')
return HttpResponse(json.dumps(result), status=403, content_type=ct)