From f434e858ed17bbab1bcd0f5c4b4cbed0a8265206 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 1 Apr 2025 08:59:21 -0500 Subject: [PATCH] fix(mobile): getAllByRemoteId return all assets on empty arguments value (#17263) * chore: post release tasks * fix(mobile): getAllByRemoteId return all assets if ids is empty --- mobile/lib/repositories/asset.repository.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mobile/lib/repositories/asset.repository.dart b/mobile/lib/repositories/asset.repository.dart index ac1c768df0..d9e8897e97 100644 --- a/mobile/lib/repositories/asset.repository.dart +++ b/mobile/lib/repositories/asset.repository.dart @@ -71,8 +71,13 @@ class AssetRepository extends DatabaseRepository implements IAssetRepository { Future> getAllByRemoteId( Iterable ids, { AssetState? state, - }) => - _getAllByRemoteIdImpl(ids, state).findAll(); + }) async { + if (ids.isEmpty) { + return []; + } + + return _getAllByRemoteIdImpl(ids, state).findAll(); + } QueryBuilder _getAllByRemoteIdImpl( Iterable ids,