|
@@ -910,16 +910,16 @@ def add_model(cls,**kwargs):
|
|
|
#更新group_rank
|
|
|
#ccc.cache.lpush(settings.RANK_LIST,obj.id)
|
|
|
ccc.cache.lpush(settings.RANK_LIST,"%s_%s" %(obj.match_id,obj.id))
|
|
|
- return obj.id
|
|
|
|
|
|
+ if model_name == "PlayerRecord":
|
|
|
+ rst = {"id":obj.id,"user_id":obj.user_id,"match_id":match_id}
|
|
|
+ return rst
|
|
|
+ else:
|
|
|
+ return obj.id
|
|
|
|
|
|
- obj = model.objects.create(**kwargs)
|
|
|
|
|
|
- if model_name == "PlayerRecord":
|
|
|
- rst = {"id":obj.id,"user_id":obj.user_id,"match_id":match_id}
|
|
|
- return rst
|
|
|
- else:
|
|
|
- return obj.id
|
|
|
+ obj = model.objects.create(**kwargs)
|
|
|
+ return obj.id
|
|
|
|
|
|
def update_model(cls,**kwargs):
|
|
|
"""
|