1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 00:00:00 +00:00

Merge pull request #2331 from haiwen/share-link-trans

update trans bug of checking share link expire days
This commit is contained in:
zheng xie
2018-09-03 11:00:30 +08:00
committed by GitHub

View File

@@ -227,14 +227,14 @@ class ShareLinks(APIView):
if SHARE_LINK_EXPIRE_DAYS_MIN > 0:
if expire_days < SHARE_LINK_EXPIRE_DAYS_MIN:
error_msg = _('Expire days should be greater or equal to %s' %
SHARE_LINK_EXPIRE_DAYS_MIN)
error_msg = _('Expire days should be greater or equal to %s') % \
SHARE_LINK_EXPIRE_DAYS_MIN
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
if SHARE_LINK_EXPIRE_DAYS_MAX > 0:
if expire_days > SHARE_LINK_EXPIRE_DAYS_MAX:
error_msg = _('Expire days should be less than or equal to %s' %
SHARE_LINK_EXPIRE_DAYS_MAX)
error_msg = _('Expire days should be less than or equal to %s') % \
SHARE_LINK_EXPIRE_DAYS_MAX
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
if expire_days <= 0: