Bug #75089
TypeError: unsupported operand type(s) for &: 'PdfObject' and 'int'
Début:
03 mars 2023
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/107517/
TypeError: unsupported operand type(s) for &: 'PdfObject' and 'int' (8 additional frame(s) were not displayed) ... File "passerelle/base/views.py", line 51, in get_context_data context = super().get_context_data(**kwargs) File "django/views/generic/edit.py", line 66, in get_context_data kwargs['form'] = self.get_form() File "django/views/generic/edit.py", line 33, in get_form return form_class(**self.get_form_kwargs()) File "passerelle/apps/pdf/forms.py", line 35, in __init__ for i, field in enumerate(page.fields): File "passerelle/utils/pdf.py", line 107, in fields and not (pdf_field_flags & RADIO_FLAG)
Fichiers
Révisions associées
utils.pdf: cast field's flags (#75089)
Historique
Mis à jour par Lauréline Guérin il y a environ un an
- Projet changé de Suivi des traces à Passerelle
Mis à jour par Thomas Noël il y a environ un an
- Fichier cerfa_13394-05.pdf cerfa_13394-05.pdf ajouté
Reproductible avec ce CERFA 13394
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Nouveau à En cours
- Assigné à mis à Thomas Noël
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de En cours à Solution proposée
- Assigné à changé de Thomas Noël à Benjamin Dauvergne
Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/passerelle/pulls/135
- Titre : wip/75089-TypeError-unsupported-operand-ty
- Modifications : https://git.entrouvert.org/entrouvert/passerelle/pulls/135/files
Mis à jour par Benjamin Dauvergne il y a environ un an
Pas besoin de tester ça, faudrait ajouter un if annot.Ff is not None: flag = int(annot.Ff)
pour en voir la couverture. Mais au passage je propose de simplifier les accesseurs au champ d'un dico pdf, le code est moins verbeux comme ça,
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Solution proposée à Solution validée
Thomas NOËL (tnoel) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Solution validée à Résolu (à déployer)
Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/passerelle/pulls/135
- Titre : mieux gérer les flags des champs PDF (#75089)
- Modifications : https://git.entrouvert.org/entrouvert/passerelle/pulls/135/files
Mis à jour par Transition automatique il y a environ un an
- Statut changé de Résolu (à déployer) à Solution déployée
utils.pdf: simplify PDF dict accesses (#75089)