Projet

Général

Profil

Bug #40003

DDPACS : raise une API error plutôt que return

Ajouté par Emmanuel Cazenave il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
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

Révision 6489efec (diff)
Ajouté par Emmanuel Cazenave il y a environ 4 ans

mdel_ddpacs: raise APIError instead of returning it (#40003)

Historique

#1

Mis à jour par Emmanuel Cazenave il y a environ 4 ans

#2

Mis à jour par Thomas Noël il y a environ 4 ans

  • Statut changé de Solution proposée à Solution validée
#3

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
#4

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

Formats disponibles : Atom PDF