Project

General

Profile

Bug #71492

500 sur une url avec id de snapshot invalide

Added by Frédéric Péters 2 months ago. Updated about 2 months ago.

Status:
Solution déployée
Priority:
Normal
Target version:
-
Start date:
21 November 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

Sans doute quelque chose foutraque dans du javascript et cette URL :

PATH_INFO       '/backoffice/forms/248/history/icons/identity-management.small.386ede.png'

cette trace :

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/sql.py", line 2084, in get
  2082                     return None
  2083                 else:
> 2084                     raise KeyError()
  2085         cur = get_connection_and_cursor()[1]
  2086

  locals:
     cls = <class 'wcs.sql.Snapshot'>
     column = None
     id = 'icons'
     ignore_errors = True
     ignore_migration = False

  File "/usr/lib/python3/dist-packages/wcs/sql.py", line 634, in f
   632         except psycopg2.Error:
   633             get_connection().rollback()
>  634             raise
   635
   636     return f

  locals:
     args = (<class 'wcs.sql.Snapshot'>, 'icons')
     func = <function SqlMixin.get at 0x7fe21571a8b0>
     kwargs = {'ignore_errors': True}

  File "/usr/lib/python3/dist-packages/wcs/backoffice/snapshots.py", line 230, in _q_lookup
   228
   229     def _q_lookup(self, component):
>  230         snapshot = get_publisher().snapshot_class.get(component, ignore_errors=True)
   231         if not snapshot or not snapshot.is_from_object(self.obj):
   232             raise errors.TraversalError()

  locals:
     component = 'icons'
     self = <wcs.backoffice.snapshots.SnapshotsDirectory object at 0x7fe214581e80>

Files

Associated revisions

Revision 555547e8 (diff)
Added by Frédéric Péters about 2 months ago

sql: honor ignore_errors in get() when using numeric ids (#71492)

History

#1

Updated by Frédéric Péters about 2 months ago

  • Status changed from Nouveau to En cours
  • Assignee set to Frédéric Péters
#2

Updated by Frédéric Péters about 2 months ago

#3

Updated by Lauréline Guérin about 2 months ago

  • Status changed from Solution proposée to Solution validée
#4

Updated by Frédéric Péters about 2 months ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 555547e8acf55274b668b09762bcb1e1f7decd05
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Thu Dec 8 21:36:54 2022 +0100

    sql: honor ignore_errors in get() when using numeric ids (#71492)
#5

Updated by Transition automatique about 2 months ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF