Fixed importing searches

This commit is contained in:
M66B 2023-01-29 18:47:56 +01:00
parent f00a5a40d5
commit 59826ee56b
1 changed files with 4 additions and 4 deletions

View File

@ -64,14 +64,14 @@ public class EntitySearch {
public static EntitySearch fromJSON(JSONObject json) throws JSONException {
EntitySearch search = new EntitySearch();
// id
if (json.has("account"))
if (json.has("account") && !json.isNull("account"))
search.account_uuid = json.getString("account");
if (json.has("folder"))
if (json.has("folder") && !json.isNull("folder"))
search.folder_name = json.getString("folder");
search.name = json.getString("name");
if (json.has("order"))
if (json.has("order") && !json.isNull("order"))
search.order = json.getInt("order");
if (json.has("color"))
if (json.has("color") && !json.isNull("color"))
search.order = json.getInt("color");
search.data = json.getString("data");