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

don't allow sites without modeling_parameters to have power, poa observations #241

Closed sentry-io[bot] closed 4 years ago

sentry-io[bot] commented 4 years ago

Should not be allowed in the API, nor as an option in the dashboard form.

Sentry Issue: API-3R

AttributeError: 'Site' object has no attribute 'modeling_parameters'
  File "rq/worker.py", line 886, in perform_job
    rv = job.perform()
  File "rq/job.py", line 664, in perform
    self._result = self._execute()
  File "rq/job.py", line 670, in _execute
    return self.func(*self.args, **self.kwargs)
  File "solarforecastarbiter/validation/tasks.py", line 372, in immediate_observation_validation
    validation_flags = validation_func(observation, value_series)
  File "solarforecastarbiter/validation/tasks.py", line 154, in validate_poa_global
    aoi_func = pvmodel.aoi_func_factory(observation.site.modeling_parameters)
alorenzo175 commented 4 years ago

should be implemented in sql procedure

lboeman commented 4 years ago

I'm working on this for the dashboard, and will try to tackle this at the API next. Does this extend to Forecasts as well?

wholmgren commented 4 years ago

Yes