Permalink
Browse files

tolerate missing doc

  • Loading branch information...
hofmeister committed Jun 7, 2011
1 parent 971af70 commit d733757e0a39facd0d09954a4c198101d8f3f00d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/github/rnewson/couchdb/lucene/couchdb/Database.java
@@ -166,7 +166,7 @@ public UUID getOrCreateUuid() throws IOException, JSONException {
final List<JSONObject> result = new ArrayList<JSONObject>();
final JSONArray rows = json.getJSONArray("rows");
for (int i = 0; i < rows.length(); i++) {
- result.add(rows.getJSONObject(i).getJSONObject("doc"));
+ result.add(rows.getJSONObject(i).optJSONObject("doc"));
}
return result;
}

0 comments on commit d733757

Please sign in to comment.