diff options
author | desperateCoder <echotodevnull@gmail.com> | 2021-03-29 19:15:01 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2021-03-29 19:15:01 +0300 |
commit | d72743dc9a7effbaaa8949b804f7971e6ffc3bb2 (patch) | |
tree | fd59973d48009a55f2b503389ded76c9935b1590 /app/src/main | |
parent | 1aefa64be4ca6a278f43653a9383b3fb694d61c9 (diff) |
#874 more failsafe sync
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/CardDataProvider.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/CardDataProvider.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/CardDataProvider.java index ddb34937f..09f548809 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/CardDataProvider.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/CardDataProvider.java @@ -286,6 +286,12 @@ public class CardDataProvider extends AbstractSyncDataProvider<FullCard> { continue; } Card card = dataBaseAdapter.getCardByRemoteIdDirectly(account.getId(), changedUser.getCardId()); + + if (card == null) { + // weird constellation... see https://github.com/stefan-niedermann/nextcloud-deck/issues/874 + // this shouldn't actually happen, but does as it seems. the card cant be found by remote id (exists!) and account-ID. + continue; + } if (this.stack == null) { stack = dataBaseAdapter.getFullStackByLocalIdDirectly(card.getStackId()); } else { |