logger.error("Api key was not found in datastore despite character having reference to it, this is inconsistency, character: {} ({})", character.getName(), character.getCharacterID());
throw new EveApiException("Character has invalid api key");
}
CharacterSheetDto characterSheetDto = eveApiGateway.getCharacterSheet(decodeApiKeyString(apiKey.getEncodedApiKeyString()), apiKey.getApiKeyUserID(), character.getCharacterID());
CorporationSheetDto corporationSheetDto = eveApiGateway.getCorporationSheet(characterSheetDto.getCorporationID());
character.setName(characterSheetDto.getName());
character.setCorporationID(characterSheetDto.getCorporationID());
character.setCorporationName(characterSheetDto.getCorporationName());
character.setCorporationTitles(characterSheetDto.getCorporationTitles());
character.setCorporationTicker(corporationSheetDto.getTicker());
character.setAllianceID(corporationSheetDto.getAllianceID());
character.setAllianceName(corporationSheetDto.getAllianceName());
character.setUpdatedDate(new Date());
}