diff --git a/commandes/bug_report.py b/commandes/bug_report.py index 8a6d301..cc0c871 100644 --- a/commandes/bug_report.py +++ b/commandes/bug_report.py @@ -437,7 +437,16 @@ class BugReport(commands.Cog): async def handle_deployment_complete(self, request): """Notifie les demandeurs dont la fonctionnalité a été intégrée et attend le prochain déploiement.""" try: - await request.json() + try: + await request.json() + except Exception: + try: + raw_body = await request.text() + if raw_body and raw_body.strip(): + json.loads(raw_body) + except Exception: + pass + for issue_iid, issue_data in list(self.issue_data.items()): if not issue_data.get("pending_deployment_notification"): continue diff --git a/serveur_flask.py b/serveur_flask.py index 59a22ca..bb9d4d0 100644 --- a/serveur_flask.py +++ b/serveur_flask.py @@ -91,7 +91,7 @@ def run_mep_logic(author, commit_msg, branch="main"): # 4. Notifier le bot que le déploiement est terminé pour les issues en attente for attempt in range(6): try: - requests.post("http://127.0.0.1:5001/deployment_complete", timeout=5) + requests.post("http://127.0.0.1:5001/deployment_complete", json={}, timeout=5) break except Exception: if attempt < 5: