From d2ba1061f2dd33054512d3e99b9298b3186da407 Mon Sep 17 00:00:00 2001 From: timonrieger Date: Tue, 2 Jun 2026 00:52:47 +0200 Subject: [PATCH] followup for #24155 The dart generator can't express discriminated unions (see editing.dto.ts) properly, so the flattened class always has "missing" fields from the other variants. --- mobile/lib/utils/openapi_patching.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 07f025b021..92a2e3e9d5 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -47,6 +47,16 @@ dynamic upgradeDto(dynamic value, String targetType) { addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String()); addDefault(value, 'hasProfileImage', false); } + case 'AssetEditActionItemDtoParameters': + if (value is Map) { + addDefault(value, 'angle', 0); + addDefault(value, 'x', 0); + addDefault(value, 'y', 0); + addDefault(value, 'width', 0); + addDefault(value, 'height', 0); + addDefault(value, 'axis', 'horizontal'); + } + break; case 'SyncAssetV1': if (value is Map) { addDefault(value, 'isEdited', false);