瀏覽代碼

Fix crash in /aardbei/diff_people

Maarten van den Berg 5 年之前
父節點
當前提交
61fa8c247c
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      piket_server/routes/aardbei.py

+ 4 - 4
piket_server/routes/aardbei.py

@@ -35,7 +35,7 @@ def common_prepare_aardbei_sync(
35 35
     return match_local_aardbei(aardbei_people)
36 36
 
37 37
 
38
-@app.route("/people/aardbei_diff", methods=["POST"])
38
+@app.route("/aardbei/diff_people", methods=["POST"])
39 39
 def aardbei_diff() -> Tuple[Dict[str, Any], int]:
40 40
     data: Dict[str, str] = request.json
41 41
     link = common_prepare_aardbei_sync(
@@ -49,14 +49,14 @@ def aardbei_diff() -> Tuple[Dict[str, Any], int]:
49 49
         {
50 50
             "num_changes": link.num_changes,
51 51
             "new_people": [member.person.full_name for member in link.remote_only],
52
-            "link_existing": [match.local.name for match in link.matches],
53
-            "altered_name": [match.local.name for match in link.matches],
52
+            "link_existing": [match.local.full_name for match in link.matches],
53
+            "altered_name": [match.local.full_name for match in link.matches],
54 54
         },
55 55
         200,
56 56
     )
57 57
 
58 58
 
59
-@app.route("/people/aardbei_apply", methods=["POST"])
59
+@app.route("/aardbei/sync_people", methods=["POST"])
60 60
 def aardbei_apply() -> Union[Tuple[Dict[str, Any], int]]:
61 61
     data: Dict[str, str] = request.json
62 62
     link = common_prepare_aardbei_sync(