InfluxCommunity / influxdb-ruby

Ruby client for InfluxDB
MIT License
370 stars 133 forks source link

Client#list_series raises NoMethodError if database is empty #194

Closed skladd closed 7 years ago

skladd commented 7 years ago

Hi, I would expect the following code to return an empty array, not to raise an exception:

db_name = 'empty_db'
influxdb = InfluxDB::Client.new(host: 'localhost', database: db_name)
influxdb.delete_database(db_name)
influxdb.create_database(db_name)
influxdb.list_series # => NoMethodError: private method `select' called for nil:NilClass from /var/lib/gems/2.3.0/gems/influxdb-0.3.14/lib/influxdb/query/core.rb:138:in `raw_values'