Add default geo location (0, 0) when tgu join

Brightcells 8 年之前
父節點
當前提交
897377a01f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      group/tourguidegroupuser_views.py

+ 3 - 0
group/tourguidegroupuser_views.py

@@ -97,6 +97,9 @@ def tgu_group_user_join_api(request):
97 97
 
98 98
     curinfo = get_current_photos(group_id, user_id, group_user.current_id)
99 99
 
100
+    # 添加默认地理位置信息
101
+    r.geoadd(TOUR_GUIDE_GROUP_GEO_INFO % group_id, 0, 0, user_id)
102
+
100 103
     return response(200, 'Apply Success', u'申请成功', {
101 104
         'current_id': curinfo.get('current_id', ''),
102 105
         'photos': curinfo.get('photos', ''),