Tolerate case where there is no latest version timestamp in version info

This commit is contained in:
Shane Kilkelly 2019-01-09 12:23:26 +00:00
parent ba8ba001d6
commit b8d252244c

View file

@ -98,7 +98,11 @@ public class GetDocResult extends Result {
}
} else {
versionID = jsonObject.get("latestVerId").getAsInt();
createdAt = jsonObject.get("latestVerAt").getAsString();
if (jsonObject.has("latestVerAt")) {
createdAt = jsonObject.get("latestVerAt").getAsString();
} else {
createdAt = null;
}
if (jsonObject.has("migratedFromId")) {
migratedFromID = jsonObject.get("migratedFromId").getAsString();
} else {