Generate conflict if number of item creators changed
This commit is contained in:
parent
f165204b88
commit
49593266e1
1 changed files with 15 additions and 7 deletions
|
@ -1487,14 +1487,22 @@ Zotero.Sync.Server.Data = new function() {
|
|||
if (!diff) {
|
||||
// Check if creators changed
|
||||
var creatorsChanged = false;
|
||||
|
||||
var creators = obj.getCreators();
|
||||
creators = creators.concat(remoteObj.getCreators());
|
||||
for each(var creator in creators) {
|
||||
var r = remoteCreatorStore[creator.ref.id];
|
||||
// Doesn't include dateModified
|
||||
if (r && !r.equals(creator.ref)) {
|
||||
creatorsChanged = true;
|
||||
break;
|
||||
var remoteCreators = remoteObj.getCreators();
|
||||
|
||||
if (creators.length != remoteCreators.length) {
|
||||
creatorsChanged = true;
|
||||
}
|
||||
else {
|
||||
creators = creators.concat(remoteCreators);
|
||||
for each(var creator in creators) {
|
||||
var r = remoteCreatorStore[creator.ref.id];
|
||||
// Doesn't include dateModified
|
||||
if (r && !r.equals(creator.ref)) {
|
||||
creatorsChanged = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!creatorsChanged) {
|
||||
|
|
Loading…
Reference in a new issue