Skip to content

Commit

Permalink
Fix when group bucket prefix is null (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt authored Oct 3, 2023
1 parent 7053feb commit d1ba838
Show file tree
Hide file tree
Showing 2 changed files with 249 additions and 247 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
@Service
public class OnyxiaUserProvider {

Pattern rfc1123Pattern = Pattern.compile("[a-z0-9]([-a-z0-9]*[a-z0-9])?");
@Autowired private UserProvider userProvider;

@Autowired private KubernetesService kubernetesService; // TODO : cleanup

private Logger logger = LoggerFactory.getLogger(OnyxiaUserProvider.class);

Pattern rfc1123Pattern = Pattern.compile("[a-z0-9]([-a-z0-9]*[a-z0-9])?");

public OnyxiaUser getUser(Region region) {
OnyxiaUser user = new OnyxiaUser(userProvider.getUser(region));

Expand Down Expand Up @@ -51,7 +48,12 @@ public OnyxiaUser getUser(Region region) {
if (region.getData() != null
&& region.getData().getS3() != null) {
project.setBucket(
region.getData().getS3().getGroupBucketPrefix()
(region.getData().getS3().getGroupBucketPrefix()
== null
? ""
: region.getData()
.getS3()
.getGroupBucketPrefix())
+ projectBaseName);
}
project.setNamespace(
Expand Down
Loading

0 comments on commit d1ba838

Please sign in to comment.