Browse Source

Fix crash in /aardbei/diff_people

Maarten van den Berg 5 years ago
parent
commit
61fa8c247c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      piket_server/routes/aardbei.py

+ 4 - 4
piket_server/routes/aardbei.py

35
     return match_local_aardbei(aardbei_people)
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
 def aardbei_diff() -> Tuple[Dict[str, Any], int]:
39
 def aardbei_diff() -> Tuple[Dict[str, Any], int]:
40
     data: Dict[str, str] = request.json
40
     data: Dict[str, str] = request.json
41
     link = common_prepare_aardbei_sync(
41
     link = common_prepare_aardbei_sync(
49
         {
49
         {
50
             "num_changes": link.num_changes,
50
             "num_changes": link.num_changes,
51
             "new_people": [member.person.full_name for member in link.remote_only],
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
         200,
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
 def aardbei_apply() -> Union[Tuple[Dict[str, Any], int]]:
60
 def aardbei_apply() -> Union[Tuple[Dict[str, Any], int]]:
61
     data: Dict[str, str] = request.json
61
     data: Dict[str, str] = request.json
62
     link = common_prepare_aardbei_sync(
62
     link = common_prepare_aardbei_sync(