We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e36016 commit 2552e55Copy full SHA for 2552e55
src/main/java/org/tailormap/api/security/OIDCRepository.java
@@ -89,13 +89,10 @@ public OIDCRegistrationMetadata getMetadataForRegistrationId(String id) {
89
metadata.showForViewer = oidcShowForViewer;
90
} else {
91
metadata.showForViewer = true;
92
- }
93
- OIDCConfiguration config =
94
- oidcConfigurationRepository.findById(Long.valueOf(id)).orElse(null);
95
- if (config != null && config.getImage() != null) {
96
- metadata.image = config.getImage();
97
- } else {
98
- metadata.image = null;
+ metadata.image = oidcConfigurationRepository
+ .findById(Long.valueOf(id))
+ .map(OIDCConfiguration::getImage)
+ .orElse(null);
99
}
100
101
return metadata;
0 commit comments