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:
@@ -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):
|
||||
"""
|
||||
|
3
views.py
3
views.py
@@ -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.')
|
||||
|
Reference in New Issue
Block a user