Skip to content

Commit

Permalink
Merge pull request ControlSystemStudio#3205 from ControlSystemStudio/…
Browse files Browse the repository at this point in the history
…fix_olog_update

Edit olog entry called wrong endpoint
  • Loading branch information
georgweiss authored Dec 6, 2024
2 parents 1409ed5 + 18856f4 commit cd82745
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,25 @@ public void submit() {
if (editMode.equals(EditMode.NEW_LOG_ENTRY)) {
ologLog.setAttachments(attachmentsEditorController.getAttachments());
}
else{
ologLog.setId(logEntry.getId());
}
ologLog.setProperties(logPropertiesEditorController.getProperties());

LogClient logClient =
logFactory.getLogClient(new SimpleAuthenticationToken(usernameProperty.get(), passwordProperty.get()));
try {
if (replyTo == null) {
logEntryResult = Optional.of(logClient.set(ologLog));
} else {
logEntryResult = Optional.of(logClient.reply(ologLog, replyTo));
if(editMode.equals(EditMode.NEW_LOG_ENTRY)){
if (replyTo == null) {
logEntryResult = Optional.of(logClient.set(ologLog));
} else {
logEntryResult = Optional.of(logClient.reply(ologLog, replyTo));
}
}
else{
logEntryResult = Optional.of(logClient.update(ologLog));
}

// Not dirty anymore...
isDirty = false;

Expand Down

0 comments on commit cd82745

Please sign in to comment.