Commit 1e192899 authored by Matija Obreza's avatar Matija Obreza

Set custom ISO3166-3 codes to active (CG institutes)

parent 5af68cd0
......@@ -52,9 +52,9 @@ import org.genesys2.server.service.filter.CountryFilter;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilter;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.genesys2.server.service.worker.CountryInfo;
import org.genesys2.server.service.worker.DavrosCountrySource;
import org.genesys2.server.service.worker.CustomISO3166Source;
import org.genesys2.server.service.worker.CustomISO3166Source.Custom3166Entry;
import org.genesys2.server.service.worker.DavrosCountrySource;
import org.genesys2.server.service.worker.GeoNamesCountrySource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -296,12 +296,14 @@ public class GeoServiceImpl implements GeoService {
newCountry.setCode3(countryInfo.getCode3());
newCountry.setName(countryInfo.getName());
newCountry.setWikiLink(countryInfo.getUrl());
newCountry.setCurrent(true);
countryRepository.save(newCountry);
LOG.info("Added ISO3166 code {}", newCountry);
} else {
LOG.debug("Updating existing custom ISO3166 code {}", country.getCode3());
country.setCurrent(true);
country.setName(countryInfo.getName());
country.setWikiLink(countryInfo.getUrl());
countryRepository.save(country);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment