Navigation Menu

Skip to content

Commit

Permalink
Harvester / Properly retrieve owner id from harvester config.
Browse files Browse the repository at this point in the history
  • Loading branch information
François Prunayre committed Dec 17, 2013
1 parent 0660183 commit f7b9cfb
Showing 1 changed file with 5 additions and 6 deletions.
Expand Up @@ -87,9 +87,9 @@ public void create(Element node) throws BadInputEx {
name = Util.getParam(site, "name", "");
uuid = Util.getParam(site, "uuid", UUID.randomUUID().toString());

Element ownerIdE = site.getChild("ownerId");
Element ownerIdE = node.getChild("owner");
if(ownerIdE != null) {
ownerId = ownerIdE.getText();
ownerId = ownerIdE.getChildText("id");
}

if(StringUtils.isEmpty(ownerId)){
Expand Down Expand Up @@ -139,11 +139,10 @@ public void update(Element node) throws BadInputEx {

name = Util.getParam(site, "name", name);

Element ownerIdE = node.getChild("ownerId");
Element ownerIdE = node.getChild("owner");
if(ownerIdE != null) {
ownerId = ownerIdE.getText();
}
else {
ownerId = ownerIdE.getChildText("id");
} else {
Log.warning(Geonet.HARVEST_MAN, "No owner defined for harvester: " + name + " (" + uuid + ")");
}

Expand Down

0 comments on commit f7b9cfb

Please sign in to comment.