From 7e3f0c62a2756c72bd799848d80dccf304211182 Mon Sep 17 00:00:00 2001 From: Corey Baker Date: Mon, 24 Apr 2023 17:39:02 -0400 Subject: [PATCH] Switch pull revision back to >= --- Sources/ParseCareKit/ParseRemote.swift | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Sources/ParseCareKit/ParseRemote.swift b/Sources/ParseCareKit/ParseRemote.swift index 5623de275..07d97dd0d 100644 --- a/Sources/ParseCareKit/ParseRemote.swift +++ b/Sources/ParseCareKit/ParseRemote.swift @@ -204,16 +204,9 @@ public class ParseRemote: OCKRemoteSynchronizable { // 3. Pull the latest revisions from the remote. let localClock = knowledgeVector.clock(for: self.uuid) - let query: Query! - if localClock > 0 { - query = PCKRevisionRecord.query(ObjectableKey.logicalClock > localClock, + let query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock, ObjectableKey.clockUUID == self.uuid) - .order([.ascending(ObjectableKey.logicalClock)]) - } else { - query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock, - ObjectableKey.clockUUID == self.uuid) - .order([.ascending(ObjectableKey.logicalClock)]) - } + .order([.ascending(ObjectableKey.logicalClock)]) do { let revisions = try await query.find() self.notifyRevisionProgress(0,