Add null check on the Organisation fromMap mapper
This commit is contained in:
parent
5b78943131
commit
8c2ae8cf46
|
@ -99,13 +99,15 @@ public class Organisation implements DataModel<eu.eudat.data.entities.Organisati
|
||||||
|
|
||||||
public static Organisation fromMap(HashMap<String, Object> map) {
|
public static Organisation fromMap(HashMap<String, Object> map) {
|
||||||
Organisation model = new Organisation();
|
Organisation model = new Organisation();
|
||||||
model.id = (String) map.get("id");
|
if (map != null) {
|
||||||
model.key = (String) map.get("key");
|
model.id = (String) map.get("id");
|
||||||
model.label = (String) map.get("label");
|
model.key = (String) map.get("key");
|
||||||
model.name = (String) map.get("name");
|
model.label = (String) map.get("label");
|
||||||
model.reference = (String) map.get("reference");
|
model.name = (String) map.get("name");
|
||||||
model.status = (int) map.get("status");
|
model.reference = (String) map.get("reference");
|
||||||
model.tag = (String) map.get("tag");
|
model.status = (int) map.get("status");
|
||||||
|
model.tag = (String) map.get("tag");
|
||||||
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue