Skip to content

Commit

Permalink
Don't use original datastream checksum for update
Browse files Browse the repository at this point in the history
  • Loading branch information
claussni committed Jun 26, 2017
1 parent 6f3a88d commit 12ac498
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,13 @@ public void modifyDatastream(String pid, Datastream update, String logMessage) t
original.getFormatURI(),
content,
original.getChecksumType(),
original.getChecksum(),
null,
logMessage,
false);
} else {
final String contentLocationUrl =
(update instanceof URLContentLocationDatastream) ?
((URLContentLocationDatastream) update).getURL() : null;
final String checksum =
(contentLocationUrl != null) ?
original.getChecksum() : null;

_APIM.modifyDatastreamByReference(
pid,
Expand All @@ -213,7 +210,7 @@ public void modifyDatastream(String pid, Datastream update, String logMessage) t
original.getFormatURI(),
contentLocationUrl,
original.getChecksumType(),
checksum,
null,
logMessage,
false);
}
Expand Down

0 comments on commit 12ac498

Please sign in to comment.