Projet

Général

Profil

Bug #19382

notifier le paiement uniquement pour les transactions qui ont été payées

Ajouté par Frédéric Péters il y a plus de 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
11 octobre 2017
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Peut-être qu'il y a des trucs en amont qui évitent ça mais quand même, bretelles.


Fichiers

Révisions associées

Révision a930b941 (diff)
Ajouté par Frédéric Péters il y a plus de 6 ans

lingo: only notify paid transactions (#19382)

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 6 ans

#3

Mis à jour par Thomas Noël il y a plus de 6 ans

on le ferait pas plutôt dans notify_remote_items_of_payments ? (ou alors en plus ?)

diff --git a/combo/apps/lingo/models.py b/combo/apps/lingo/models.py
index 725076b..1709984 100644
--- a/combo/apps/lingo/models.py
+++ b/combo/apps/lingo/models.py
@@ -336,6 +336,8 @@ class Transaction(models.Model):

     def notify_remote_items_of_payments(self, items):
         logger = logging.getLogger(__name__)
+        if not self.is_paid():
+            return
         if not items:
             return

#5

Mis à jour par Thomas Noël il y a plus de 6 ans

Ack (j'ai pas regardé non plus si ça pouvait arriver en vrai, c'est un peu spaget' ce coin)

#6

Mis à jour par Frédéric Péters il y a plus de 6 ans

  • Statut changé de En cours à Résolu (à déployer)
commit a930b94120380ae6d64e8f9adedfa2b5134124c8
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Wed Oct 11 16:59:09 2017 +0200

    lingo: only notify paid transactions (#19382)
#7

Mis à jour par Frédéric Péters il y a plus de 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF