Project

General

Profile

Bug #65262

KeyError: 'data'

Added by Sentry Io 15 days ago. Updated 5 days ago.

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

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/58203/

KeyError: 'data'
(12 additional frame(s) were not displayed)
...
  File "combo/public/templatetags/combo.py", line 162, in render_cell
    return cell.render(context)
  File "combo/data/models.py", line 1346, in render
    context.update(self.get_cell_extra_context(context))
  File "combo/apps/wcs/models.py", line 906, in get_cell_extra_context
    extra_context = super().get_cell_extra_context(context)
  File "combo/apps/wcs/models.py", line 367, in get_cell_extra_context
    return {self.variable_name: self.get_data(context)}
  File "combo/apps/wcs/models.py", line 346, in get_data
    wcs_site['data'] = json_response['data']

Files

Associated revisions

Revision e1f6c6e4 (diff)
Added by Lauréline Guérin 5 days ago

api: fix form/carddata listing with unknown custom view (#65262)

History

#1

Updated by Lauréline Guerin 15 days ago

  • Project changed from Suivi des traces to Combo
#2

Updated by Lauréline Guerin 12 days ago

  • Project changed from Combo to w.c.s.

Je déplace ce ticket dans wcs:
L'url appelée est https://formulaires.tao.thononagglo.fr/api/cards/sun_inventaire_materiel/list/peripherique
mais si on met un truc bidon derrière (genre https://formulaires.tao.thononagglo.fr/api/cards/sun_inventaire_materiel/list/peripheriquefoobar) la réponse est la même: on récupère la fiche d'id 404

Dans ApiFormPageMixin._q_traverse:

                for view in self.get_custom_views(
                    [StrictNotEqual('visibility', 'owner'), Equal('slug', path[1])]
                ):
                    self._view = view
                    break
                else:
                    path = ['404']

#3

Updated by Lauréline Guerin 12 days ago

#4

Updated by Frédéric Péters 5 days ago

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

Très joli.

#5

Updated by Lauréline Guerin 5 days ago

j'envoie dans cette release ou dans la suivante ?

#6

Updated by Frédéric Péters 5 days ago

ok pour celle-ci.

#7

Updated by Lauréline Guerin 5 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit e1f6c6e47c5d1a9745f96104c9b0508228e0e07d
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Tue May 17 16:24:18 2022 +0200

    api: fix form/carddata listing with unknown custom view (#65262)
#8

Updated by Transition automatique 5 days ago

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

Also available in: Atom PDF