Bug #40003
DDPACS : raise une API error plutôt que return
Début:
19 février 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
def _handle_create(self, request, payload): reference = 'A-' + payload['display_id'] try: demand = self.demand_set.create( reference=reference, step=1, data=payload) except IntegrityError as e: return APIError('reference-non-unique', http_status=400, data={'original_exc': exception_to_text(e)})
Fichiers
Révisions associées
Historique
Mis à jour par Emmanuel Cazenave il y a environ 4 ans
- Fichier 0001-mdel_ddpacs-raise-APIError-instead-of-returning-it-4.patch 0001-mdel_ddpacs-raise-APIError-instead-of-returning-it-4.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Assigné à mis à Emmanuel Cazenave
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Emmanuel Cazenave il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 6489efec8f37011ecaf0fbe40c3458e11d80686e Author: Emmanuel Cazenave <ecazenave@entrouvert.com> Date: Wed Feb 19 11:33:20 2020 +0100 mdel_ddpacs: raise APIError instead of returning it (#40003
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
mdel_ddpacs: raise APIError instead of returning it (#40003)