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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user