1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

Fixed rpc return value bug

This commit is contained in:
zhengxie
2013-02-28 19:58:02 +08:00
parent cd1408fb6b
commit f108c3b79a
2 changed files with 6 additions and 5 deletions

View File

@@ -157,8 +157,8 @@ def count_emailusers():
try:
ret = ccnet_threaded_rpc.count_emailusers()
except SearpcError:
ret = 0
return ret
ret = -1
return 0 if ret < 0 else ret
def get_session_info():
return ccnet_rpc.get_session_info()
@@ -666,8 +666,8 @@ def count_inner_pub_repos():
try:
ret = seafserv_threaded_rpc.count_inner_pub_repos()
except SearpcError:
ret = 0
return ret
ret = -1
return 0 if ret < 0 else ret
def is_inner_pub_repo(repo_id):
"""

View File

@@ -894,7 +894,8 @@ def repo_history_changes(request, repo_id):
changes['cmt_desc'] = repo.desc
elif c.second_parent_id is None:
# Normal commit only has one parent.
changes['cmt_desc'] = c.desc
if c.desc.startswith('Changed library'):
changes['cmt_desc'] = _('Changed library name or description')
else:
# A commit is a merge only if it has two parents.
changes['cmt_desc'] = _('No conflict in the merge.')