Commit graph

13 commits

Author SHA1 Message Date
Pierre de La Morinerie
5e05556ee8 dossiers: add a validation on dossier individual
Validate that a dossier on a `for_individual?` procedure always has
an `individual` associated record.

For this, the individual needs to be built before the record is
validated (i.e. even before the `before_create` callback is run).

This should help with #4596: now if a dossier is created without an
`individual`, or if the `invividual` record is later removed, the
validation will fail.
2020-01-08 10:48:22 +01:00
Pierre de La Morinerie
88373ddf20 individual: raise when the individual object cannot be created
Currently, a number of dossiers in production are for procedures for
individuals, but don't have a `individual` object.

This is probably because creating the Individual from France Connect
infos fails – but fails quietly, and nullify the relationship.

As a first step, we now raise an exception when the creation from FC
infos fails. We will then identify the issue, and see if we can fix it –
or if we should be resilient to this kind of issues.
2019-11-12 18:29:37 +01:00
clemkeirua
1e6847bc6f introduce constants for M./Mme 2019-08-01 17:42:32 +02:00
simon lehericey
3c8d1f13b6 Individual: remove birthdate proxy 2018-04-04 15:27:30 +02:00
simon lehericey
c019cb623a Individual: use birthdate as a ... date :) 2018-04-04 13:19:39 +02:00
simon lehericey
8828663880 Individual: save the birthdate in Y 2018-04-03 16:23:15 +02:00
gregoirenovel
0a9f442260 Enable some Rails cops 2018-03-06 17:18:44 +01:00
Mathieu Magnin
3db941ea06 [Fix #1475] Ensure date is parsable before doing it (to avoid errors) 2018-02-26 13:20:23 +01:00
Mathieu Magnin
9627ba43c0 [Fix #1409] Identite can be updated 2018-02-20 11:01:47 +01:00
Mathieu Magnin
03fde0a502 [FIX #589] Force birthdate format when saving 2017-08-01 16:47:43 +02:00
Xavier J
78bba67995 Fix bug who does not saved Individual information 2016-12-21 15:39:41 +01:00
Xavier J
927d977541 Add tests and validator for individual model. 2016-12-20 17:01:16 +01:00
Xavier J
a69433e8de User can be begin without SIRET 2016-08-30 11:18:43 +02:00