fix(#138): lire le consentement photo sans heuristique photo.

Admin et reprise utilisentent uniquement la valeur API ; plus de
pré-cochage implicite si une photo est présente.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-17 12:46:54 +02:00
co-authored by Cursor
parent 59919834b9
commit 291ea26b34
3 changed files with 4 additions and 13 deletions
+2 -5
View File
@@ -49,10 +49,7 @@ class EnfantAdminModel {
}
final photoUrl = json['photo_url'] as String? ?? json['photoUrl'] as String?;
final hasPhoto = (photoUrl ?? '').trim().isNotEmpty;
// L'inscription parent exigeait le consentement pour envoyer la photo, mais
// le back a longtemps forcé consent_photo=false (voir reprise_mapper).
final consentFromApi = _parseBool(json['consent_photo']) ||
final consentPhoto = _parseBool(json['consent_photo']) ||
_parseBool(json['consentement_photo']) ||
_parseBool(json['consentPhoto']);
@@ -67,7 +64,7 @@ class EnfantAdminModel {
(json['status'] ?? json['statut'])?.toString(),
),
photoUrl: photoUrl,
consentPhoto: consentFromApi || hasPhoto,
consentPhoto: consentPhoto,
isMultiple: _parseBool(json['is_multiple']) ||
_parseBool(json['est_multiple']),
parentLinks: links,