发现这个版本从其他系统导过来的群组列表展示 时都中文乱码(linux的时候没测过) ,所以 干脆自己改一下
seahub\thirdpart\seaserv\service.py
# group
def get_group(group_id):
#group_id_int = int(group_id)
"""
try:
group = ccnet_threaded_rpc.get_group(group_id_int)
except SearpcError:
group = None
"""
try:
from django.db import connection
cursor = connection.cursor()
sql ="select distinct g.group_id ,g.group_name,g.creator_name,g.timestamp from `ccnet-db`.`group` g where g.group_id =%s"
cursor.execute(sql, [group_id])
group = cursor.fetchone()
return DBGroup(group[0],group[1],group[2],group[3])
except Exception,e:
logger.error(e)
#return group
return None
其他还有不少类似的都这样修改
来源:oschina
链接:https://my.oschina.net/u/615640/blog/511200