SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

Return error when empty data is posted. #305

Closed lboeman closed 3 years ago

lboeman commented 3 years ago

Adds a check for a size 0 DataFrame when parsing posted values to avoid the indexerror raised for forecasts. Also helpful for observations to return a more precise error message. Observation endpoint previously complained about missing "quality_flag" field when data was empty.