mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-26 22:19:52 +00:00
[AB-137] fixing occurrences for templates in cases entities do not exist anymore
fixing feature mode retrieval to adapt to lowercase fixing disable exp role creation and retrieval removing ansible code
This commit is contained in:
@@ -59,14 +59,12 @@ public class ListChannelGroups extends AbstractConditionableCommand {
|
||||
List<ChannelGroupChannelModel> convertedChannels = new ArrayList<>();
|
||||
group.getChannels().forEach(channel -> {
|
||||
Optional<TextChannel> textChannelInGuild = channelService.getTextChannelFromServerOptional(channel.getServer().getId(), channel.getId());
|
||||
if(textChannelInGuild.isPresent()) {
|
||||
ChannelGroupChannelModel convertedChannel = ChannelGroupChannelModel
|
||||
.builder()
|
||||
.channel(channel)
|
||||
.discordChannel(textChannelInGuild.get())
|
||||
.build();
|
||||
convertedChannels.add(convertedChannel);
|
||||
}
|
||||
ChannelGroupChannelModel convertedChannel = ChannelGroupChannelModel
|
||||
.builder()
|
||||
.channel(channel)
|
||||
.discordChannel(textChannelInGuild.orElse(null))
|
||||
.build();
|
||||
convertedChannels.add(convertedChannel);
|
||||
});
|
||||
ChannelGroupModel channelGroup = ChannelGroupModel
|
||||
.builder()
|
||||
|
||||
@@ -41,11 +41,11 @@ public class DefaultFeatureModeManagementBean implements DefaultFeatureModeManag
|
||||
public Optional<FeatureModeProperty> getFeatureModeOptional(AFeature feature, String mode) {
|
||||
return Optional.ofNullable(defaultConfigProperties
|
||||
.getFeatureModes()
|
||||
.get(mode));
|
||||
.get(mode.toLowerCase()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeatureModeProperty getFeatureMode(AFeature feature, String mode) {
|
||||
return getFeatureModeOptional(feature, mode).orElseThrow(() -> new FeatureModeNotFoundException(mode, featureConfigService.getFeatureModesFromFeatureAsString(feature.getKey())));
|
||||
return getFeatureModeOptional(feature, mode.toLowerCase()).orElseThrow(() -> new FeatureModeNotFoundException(mode, featureConfigService.getFeatureModesFromFeatureAsString(feature.getKey())));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user