Checking if repository has a piwik site before creating an identity for it

This commit is contained in:
Antonis Lempesis 2019-08-26 12:48:40 +00:00
parent 7e21cdc153
commit 1f7a25d184
1 changed files with 10 additions and 4 deletions

View File

@ -281,10 +281,16 @@ public class Converter {
//TODO check identitites
//Map<String,String> identity = new HashMap<>();
Map<String, Object> identities = new HashMap<>();
identities.put("issuertype", "piwik");
identities.put("pid","piwik:"+repository.getPiwikInfo().getSiteId());
repositoryMap.put("identities",identities);
if (repository.getPiwikInfo() != null) {
Map<String, Object> identities = new HashMap<>();
identities.put("issuertype", "piwik");
identities.put("pid", "piwik:" + repository.getPiwikInfo().getSiteId());
repositoryMap.put("identities", identities);
}
repositoryMap.put("subjects","");
return mapper.writeValueAsString(repositoryMap);