Bug #87741
avec ADMIN_FOR_ALL, échec s'il existe un FormDef
Début:
04 mars 2024
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
def test_admin_for_all(pub): user = create_superuser(pub) role = create_role(pub) try: with open(os.path.join(pub.app_dir, 'ADMIN_FOR_ALL'), 'w'): pass # create empty file resp = get_app(pub).get('/backoffice/') assert resp.location.endswith('studio/') resp = resp.follow() # check there is a CSS class assert resp.pyquery.find('body.admin-for-all') # check there are menu items > resp.click('Forms', index=0) tests/admin_pages/test_all.py:99: .... @register.filter def get_preference(user, pref_name): > return user.get_preference(pref_name) E AttributeError: 'NoneType' object has no attribute 'get_preference' wcs/qommon/templatetags/qommon.py:1284: AttributeError
Reproductible en lançant pytest tests/test_workflow_tests.py tests/admin_pages/test_all.py::test_admin_for_all
En ajoutant un FormDef.wipe() en début de test_admin_for_all, ça passe
Révisions associées
Historique
Mis à jour par Robot Gitea il y a environ 2 mois
- Statut changé de Nouveau à En cours
- Assigné à mis à Frédéric Péters
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/1224
- Titre : WIP: templatetags: make sure |get_preference gets a user (#87741)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/1224/files
Mis à jour par Robot Gitea il y a environ 2 mois
- Statut changé de Solution proposée à Solution validée
Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a environ 2 mois
- Statut changé de Solution validée à Résolu (à déployer)
Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/1224
- Titre : templatetags: make sure |get_preference gets a user (#87741)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/1224/files
Mis à jour par Transition automatique il y a environ 2 mois
- Statut changé de Résolu (à déployer) à Solution déployée
templatetags: make sure |get_preference gets a user (#87741)