Bug #50500
vues personnalisées: ne pas crasher lors de la suppression d'un champ de la fiche qui sert à ordonner le listing
Début:
25 janvier 2021
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Trace en recette:
Exception: type = '<class 'psycopg2.ProgrammingError'>', value = 'ERREUR: la colonne « f4 » n'existe pas LINE 2: ...ander-un-renseignement-a-d-autres-services' ORDER BY f4 DESC ^ ' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/sql.py", line 1375, in select_iterator 1373 1374 conn, cur = get_connection_and_cursor() > 1375 cur.execute(sql_statement, parameters) 1376 try: 1377 for object in cls.get_objects(cur, iterator=True): locals: clause = [<NotEqual (attribute: 'status', value: 'draft')>, <Equal (attribute: 'f1', value: 'demander-un-renseignement-a-d-autres-services')>] cls = <class 'wcs.carddef._wcs_Demarche-Categorie-Objet-Service-Traitant'> conn = <connection object at 0x7f886d611508; dsn: 'dbname=wcs_services_test_demarches_lametro_fr', closed: 0> cur = <cursor object at 0x7f8871705be8; closed: 0> func_clause = None ignore_errors = False limit = None offset = None order_by = '-f4' parameters = {'c140224011650976': 'draft', 'c140223917880592': 'demander-un-renseignement-a-d-autres-services'} sql_statement = 'SELECT id, user_id, receipt_time, status, page_no, anonymised, workflow_data, prefilling_data, id_display, workflow_roles, workflow_roles_array, concerned_roles_array, actions_roles_array, tracking_code, backoffice_submission, submission_context, submission_agent_id, submission_channel, criticality_level, last_update_time, digest, user_label, f1, f7, f7_display, f7_structured, f3, f5, f6\n FROM carddata_3_demarche_categorie_objet_servi WHERE status != %(c140224011650976)s AND f1 = %(c140223917880592)s ORDER BY f4 DESC' table_static_fields = ['id', 'user_id', 'receipt_time', 'status', 'page_no', 'anonymised', 'workflow_data', 'prefilling_data', 'id_display', 'workflow_roles', 'workflow_roles_array', 'concerned_roles_array', 'actions_roles_array', 'tracking_code', 'backoffice_submission', 'submission_context', 'submission_agent_id', 'submission_channel', 'criticality_level', 'last_update_time', 'digest', 'user_label'] where_clauses = ['status != %(c140224011650976)s', 'f1 = %(c140223917880592)s']
Fichiers
Révisions associées
Historique
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Fichier 0001-sql-set-ordering-only-if-column-exists-50500.patch 0001-sql-set-ordering-only-if-column-exists-50500.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
solution peut-être un peu trop radicale ?
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Solution proposée à Solution validée
Non, c'est bien ainsi.
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 1831aff4b0366f02349649882c31df577664f854 Author: Lauréline Guérin <zebuline@entrouvert.com> Date: Thu Feb 11 15:03:13 2021 +0100 sql: set ordering only if column exists (#50500)
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
sql: set ordering only if column exists (#50500)