Skip to content

Commit

Permalink
fix: Fix broadcasting note.page.version.created event wehen draftId i…
Browse files Browse the repository at this point in the history
  • Loading branch information
azayati committed Dec 11, 2024
1 parent c1b9c45 commit 373c634
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public Page createNote(Wiki noteBook,
note.setContent(note.getContent());
Page createdPage = createNote(noteBook, parentPage, note);
NotePageProperties properties = note.getProperties();
String draftPageId = String.valueOf(properties != null && properties.isDraft() ? properties.getNoteId() : null);
String draftPageId = properties != null && properties.isDraft() ? String.valueOf(properties.getNoteId()) : null;
try {
if (properties != null) {
properties.setNoteId(Long.parseLong(createdPage.getId()));
Expand Down Expand Up @@ -2375,7 +2375,7 @@ private String processImagesOnDraftUpdate(DraftPage draftPage, long userIdentity

private Page processImagesOnNoteCreation(Page note, String draftId, long userIdentityId) throws WikiException {
String newContent = note.getContent();
if (StringUtils.isNotEmpty(draftId) && !draftId.equals("null")) {
if (StringUtils.isNotEmpty(draftId)) {
String sourceObjectType = WikiDraftPageAttachmentPlugin.OBJECT_TYPE;
attachmentService.moveAttachments(sourceObjectType,
draftId,
Expand Down

0 comments on commit 373c634

Please sign in to comment.