Skip to content

Commit a1f26b3

Browse files
author
hideki
committed
Merge branch 'master' of https://github.com/ashihaby/couchbase-lite-java-core into ashihaby-master
2 parents b86198d + f78d720 commit a1f26b3

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/main/java/com/couchbase/lite/Database.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,10 +904,8 @@ public Map<String, Object> invoke(Map<String, Object> attachment) {
904904

905905
int revPos = (Integer) attachment.get("revpos");
906906
if (revPos < minRevPos && revPos != 0) {
907-
Map<String, Object> map = new HashMap<String, Object>();
908-
map.put("stub", true);
909-
map.put("revpos", revPos);
910-
return map;
907+
//nothing changed
908+
return attachment;
911909
} else {
912910
Map<String, Object> expanded = new HashMap<String, Object>();
913911
expanded.putAll(attachment);

src/main/java/com/couchbase/lite/replicator/PusherInternal.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,12 @@ private boolean uploadMultipartRevision(final RevisionInternal revision) {
590590
Map<String, Object> body = revision.getProperties();
591591
Map<String, Object> attachments = (Map<String, Object>) body.get("_attachments");
592592

593+
boolean attachmentsFollow = false;
593594
for (String attachmentKey : attachments.keySet()) {
594595
Map<String, Object> attachment = (Map<String, Object>) attachments.get(attachmentKey);
595-
if (!attachment.containsKey("follows")) {
596-
return false;
597-
}
596+
if (attachment.containsKey("follows")) attachmentsFollow = true;
598597
}
598+
if (!attachmentsFollow) return false;
599599

600600
Log.d(TAG, "Uploading multipart request. Revision: %s", revision);
601601
addToChangesCount(1);

0 commit comments

Comments
 (0)