Projet

Général

Profil

Bug #54428

erreur sql sur filtre sur date

Ajouté par Frédéric Péters il y a presque 3 ans. Mis à jour il y a presque 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
31 mai 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Exception:
  type = '<class 'psycopg2.DataError'>', value = 'date/time field value out of range: "31/05/2021" 
LINE 1: ...t WHERE fbofb111017_d0c1_44e2_a95d_a46be259a3b0 = '31/05/202...
                                                             ^
HINT:  Perhaps you need a different "datestyle" setting.
'

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/sql.py", line 1409, in keys
  1407         if where_clauses:
  1408             sql_statement += ' WHERE ' + ' AND '.join(where_clauses)
> 1409         cur.execute(sql_statement, parameters)
  1410         ids = [x[0] for x in cur.fetchall()]
  1411         conn.commit()

  locals:
     clause = <ERROR WHILE PRINTING VALUE>
     cls = <class 'wcs.formdef._wcs_Je-M-Inscris-En-Tant-Que-Benevole-Pour-Faire-Fonctionner-Le-Centre-De-Vaccination'>
     conn = <connection object at 0x7ff72c0c3e88; dsn: 'user=wcs password=xxx dbname=wcs_demarches_aggloroanne_icitoyen_fr
host=prod.saas.entrouvert.org.clusters.entrouvert.org port=5432', closed: 0>
     cur = <cursor object at 0x7ff72c03dbe8; closed: 0>
     func_clause = None
     parameters = {'c140699466695152': '31/05/2021'}
     sql_statement = 'SELECT id FROM formdata_115_je_reserve_un_creneau_de_visit WHERE fbofb111017_d0c1_44e2_a95d_a46be259a3b0 =
%(c140699466695152)s AND anonymised IS NULL'
     where_clauses = ['fbofb111017_d0c1_44e2_a95d_a46be259a3b0 = %(c140699466695152)s', 'anonymised IS NULL']

Fichiers

Révisions associées

Révision 41edb593 (diff)
Ajouté par Frédéric Péters il y a presque 3 ans

general: convert date passed as query filter to expected format (#54428)

Historique

#1

Mis à jour par Frédéric Péters il y a presque 3 ans

  • Assigné à mis à Frédéric Péters
#2

Mis à jour par Frédéric Péters il y a presque 3 ans

#3

Mis à jour par Lauréline Guérin il y a presque 3 ans

  • Statut changé de Solution proposée à Solution validée
#4

Mis à jour par Frédéric Péters il y a presque 3 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 41edb59393b29589d2642400deb5d3a2576714c8
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Tue Jun 15 09:25:57 2021 +0200

    general: convert date passed as query filter to expected format (#54428)
#5

Mis à jour par Frédéric Péters il y a presque 3 ans

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

Formats disponibles : Atom PDF