Skip to content

Commit

Permalink
SKA-33689: Reading list error after drag and drop citation into h1 (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaswilson100 authored and ottenhoff committed Dec 8, 2017
1 parent a10cfd6 commit 1a9c450
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3230,11 +3230,15 @@ protected void set(BasicCitationCollection other, boolean isTemporary)
BasicCitation newCitation = new BasicCitation();
newCitation.copy(oldCitation);
newCitation.m_temporary = isTemporary;
this.saveCitation(newCitation);
if (isTemporary) { // save the citation if it's not saved yet
this.saveCitation(newCitation);
}

// copy the citation's citationCollectionOrder
CitationCollectionOrder newCitationCollectionOrder = citationCollectionOrder.copy(this.getId(), newCitation.getId());
this.saveCitationCollectionOrder(newCitationCollectionOrder);
if (isTemporary){ // save the citationCollectionOrder if it's not saved yet
this.saveCitationCollectionOrder(newCitationCollectionOrder);
}

} catch (IdUnusedException e) {
M_log.warn("copying citationcollectionorder(" + citationCollectionOrder.getCitationid() + ") ==> " + citationCollectionOrder.getValue(), e);
Expand All @@ -3243,7 +3247,9 @@ protected void set(BasicCitationCollection other, boolean isTemporary)
else {
// copy the citationCollectionOrder
CitationCollectionOrder newCitationCollectionOrder = citationCollectionOrder.copy(this.getId());
this.saveCitationCollectionOrder(newCitationCollectionOrder);
if (isTemporary){ // save the citationCollectionOrder if it's not saved yet
this.saveCitationCollectionOrder(newCitationCollectionOrder);
}
}
}

Expand Down

0 comments on commit 1a9c450

Please sign in to comment.