Skip to content

Commit 76143bd

Browse files
committed
fix: Incorrect type clause when searching Confluence space by key.
1 parent c5d3229 commit 76143bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/confluence/src/main/java/com/github/vogoltsov/vp/plugins/confluence/client/ConfluenceSpaceRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ public List<Space> search(String text) {
4141
/**
4242
* Returns space by key, if any.
4343
*/
44-
public Space findById(String spaceKey) {
44+
public Space findByKey(String spaceKey) {
4545
if (spaceKey == null) {
4646
return null;
4747
}
4848
return search(
4949
CQL.query(CQL.and(
50-
CQL.eq("type", "page"),
50+
CQL.eq("type", "space"),
5151
CQL.eq("space.key", spaceKey)
5252
))
5353
).stream().findAny().orElse(null);

plugins/confluence/src/main/java/com/github/vogoltsov/vp/plugins/confluence/dialog/ExportDiagramToConfluenceDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected void load() {
208208
if (page != null) {
209209
space = page.getSpace();
210210
} else if (spaceKey != null) {
211-
space = ConfluenceSpaceRepository.getInstance().findById(spaceKey);
211+
space = ConfluenceSpaceRepository.getInstance().findByKey(spaceKey);
212212
}
213213

214214
this.confluenceSpaceField.setSpace(space);

0 commit comments

Comments
 (0)