Skip to content

Commit d54bbc2

Browse files
committed
only return schema instance from controller if it has changed
1 parent d357dd3 commit d54bbc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/mysql-schema/src/main/java/com/github/containersolutions/operator/sample/SchemaController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ public Optional<Schema> createOrUpdateResource(Schema schema) {
3737
schema.setStatus(status);
3838

3939
log.info("Schema {} created", schema.getMetadata().getName());
40+
return Optional.of(schema);
4041
}
41-
return Optional.of(schema);
42+
return Optional.empty();
4243
} catch (SQLException e) {
4344
log.error("Error while creating Schema", e);
4445

0 commit comments

Comments
 (0)