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) {
|
||||
Organisation model = new Organisation();
|
||||
model.id = (String) map.get("id");
|
||||
model.key = (String) map.get("key");
|
||||
model.label = (String) map.get("label");
|
||||
model.name = (String) map.get("name");
|
||||
model.reference = (String) map.get("reference");
|
||||
model.status = (int) map.get("status");
|
||||
model.tag = (String) map.get("tag");
|
||||
if (map != null) {
|
||||
model.id = (String) map.get("id");
|
||||
model.key = (String) map.get("key");
|
||||
model.label = (String) map.get("label");
|
||||
model.name = (String) map.get("name");
|
||||
model.reference = (String) map.get("reference");
|
||||
model.status = (int) map.get("status");
|
||||
model.tag = (String) map.get("tag");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue