diff options
author | elijah <elijah@riseup.net> | 2013-08-05 02:27:23 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-08-05 02:27:23 -0700 |
commit | f5e6e60cbea2db77d275e34c3e61c590b49dbf48 (patch) | |
tree | bfde744068bfa1b2a07c6e4035b5f56d6c01a9e2 /lib | |
parent | d355aca3f2d913e6fad9913064f217b45afb8061 (diff) |
fix bug with couchdb result parsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nickserver/couch/fetch_key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nickserver/couch/fetch_key.rb b/lib/nickserver/couch/fetch_key.rb index d729ebc..db1e390 100644 --- a/lib/nickserver/couch/fetch_key.rb +++ b/lib/nickserver/couch/fetch_key.rb @@ -37,7 +37,7 @@ module Nickserver; module Couch def parse_key_from_response(uid, response) json = JSON.load(response) - if json["offset"] == 0 + if json["rows"].empty? self.fail 404, "Not Found" else return json["rows"].first["value"] |