Projet

Général

Profil

0001-lingo-comment-is_notifiable-and-do-not-log-non-error.patch

Frédéric Péters, 22 avril 2022 08:44

Télécharger (1,13 ko)

Voir les différences:

Subject: [PATCH] lingo: comment is_notifiable() and do not log non-errors
 (#64460)

 combo/apps/lingo/models.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
combo/apps/lingo/models.py
641 641
        if not self.source_url:
642 642
            return True
643 643
        url = self.source_url + 'jump/trigger/%s' % status
644
        req = requests.get(url, remote_service='auto', timeout=5)
644
        # make a GET request to trigger, it will not actually trigger it (it requires a GET)
645
        # but it will tell us if the trigger doesn't exist (by returning a 404, vs 403 access
646
        # denied).
647
        req = requests.get(url, remote_service='auto', timeout=5, log_errors=False)
645 648
        if req.status_code == 404:
646 649
            return False
647 650
        return True
648
-