@@ -88,13 +88,6 @@ public class TariffInitializationService {
|
||||
|
||||
if (existingTariffs.isEmpty()) {
|
||||
createDefaultTariffs();
|
||||
} else {
|
||||
Map<TariffType, Boolean> existingTypes = new HashMap<>();
|
||||
existingTariffs.forEach(tariff -> existingTypes.put(TariffType.valueOf(tariff.getType()), true));
|
||||
|
||||
Arrays.stream(TariffType.values())
|
||||
.filter(type -> !existingTypes.containsKey(type))
|
||||
.forEach(this::createDefaultTariff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user