Skip to content

Commit 5e0ff78

Browse files
authored
Look up final input before returning summary (#24421)
* Restore input ID assignment on create * Add change log * Revert input save changes, look up input after saving
1 parent 13c6633 commit 5e0ff78

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

changelog/unreleased/issue-12248.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ type = "a"
22
message = "Improved Inputs Overview Page: The page has been revamped with pagination and various UI enhancements to improve navigation."
33

44
pulls = ["24245", "Graylog2/graylog-plugin-enterprise#12538"]
5-
issues = ["12248"]
5+
issues = ["12248", "graylog-plugin-enterprise#24421"]

graylog2-server/src/main/java/org/graylog/aws/inputs/cloudtrail/api/CloudTrailDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public Input saveInput(CloudTrailCreateInputRequest request, User user, boolean
124124
final String newInputId = inputService.save(input);
125125
LOG.info("New CloudTrail input created. id [{}] request [{}]", newInputId, request);
126126

127-
return input;
127+
return inputService.find(newInputId);
128128
} catch (NoSuchInputTypeException e) {
129129
LOG.error("There is no such input type registered. {}", ExceptionUtils.getRootCauseMessage(e));
130130
throw new NotFoundException("There is no such input type registered.", e);

graylog2-server/src/main/java/org/graylog/integrations/aws/service/AWSService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public Input saveInput(AWSInputCreateRequest request, User user, boolean isSetup
154154
final Input input = this.inputService.create(messageInput.asMap());
155155
final String newInputId = inputService.save(input);
156156
LOG.debug("New AWS input created. id [{}] request [{}]", newInputId, request);
157-
return input;
157+
return inputService.find(newInputId);
158158
} catch (NoSuchInputTypeException e) {
159159
LOG.error("There is no such input type registered.", e);
160160
throw new NotFoundException("There is no such input type registered.", e);

0 commit comments

Comments
 (0)