1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 06:34:40 +00:00

update err msg of share dir item endpoint

This commit is contained in:
lian
2016-01-15 13:22:41 +08:00
parent f18e4c133f
commit c7c05ee1be

View File

@@ -15,7 +15,6 @@ from seahub.api2.authentication import TokenAuthentication
from seahub.api2.permissions import IsRepoAccessible from seahub.api2.permissions import IsRepoAccessible
from seahub.api2.throttling import UserRateThrottle from seahub.api2.throttling import UserRateThrottle
from seahub.api2.utils import api_error from seahub.api2.utils import api_error
from seahub.api2.status import HTTP_520_OPERATION_FAILED
from seahub.base.templatetags.seahub_tags import email2nickname from seahub.base.templatetags.seahub_tags import email2nickname
from seahub.base.accounts import User from seahub.base.accounts import User
from seahub.share.signals import share_repo_to_user_successful from seahub.share.signals import share_repo_to_user_successful
@@ -395,7 +394,7 @@ class DirSharedItemsEndpoint(APIView):
if shared_to_user: if shared_to_user:
shared_to = request.GET.get('username') shared_to = request.GET.get('username')
if shared_to is None or not is_valid_username(shared_to): if shared_to is None or not is_valid_username(shared_to):
return api_error(status.HTTP_400_BAD_REQUEST, 'Email %s invalid.' % share_to) return api_error(status.HTTP_400_BAD_REQUEST, 'Email %s invalid.' % shared_to)
try: try:
User.objects.get(email=shared_to) User.objects.get(email=shared_to)