Commit 24c105b3 authored by Fred LANGLOIS's avatar Fred LANGLOIS
Browse files

#22 Asking for translation on a multi-page document can cause a bug

parent b55f7643
Pipeline #6268 passed with stages
in 2 minutes and 54 seconds
......@@ -1058,8 +1058,10 @@ public class DocumentViewerController {
// update original resource
if ((!model.containsKey(Constants.IS_TRANSLATION) || !((Boolean) model.get(Constants.IS_TRANSLATION)).booleanValue())
&& (!model.containsKey(Constants.IS_SOURCE) || !((Boolean) model.get(Constants.IS_SOURCE)).booleanValue())) {
model.addAttribute(Constants.ORIGINAL_RESOURCE, model.get(Constants.RESOURCE));
//update ORIGINAL_RESOURCE only on load of the first page of document
if(pageNumber==1) {
model.addAttribute(Constants.ORIGINAL_RESOURCE, model.get(Constants.RESOURCE));
model.addAttribute(Constants.ORIGINAL_SEMANTIC_RESOURCE, new SemanticResource((Document) model.get(Constants.ORIGINAL_RESOURCE)));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment