GeoNet / fits

Field Time Series
Apache License 2.0
4 stars 13 forks source link

Revert breaking changes to SQL query implementation of days #152

Closed danieldooley closed 5 years ago

danieldooley commented 5 years ago

Proposed Changes

Fixes a current issue with the observation endpoint.

The change to meet linting was causing a days parameter to be incorrectly applied.

The direct cast to interval with $3::interval is not treated as days.

Postgres won't allow a parameter to be used to set interval as '$3 days'.

I'm reverting back to the old string concatenation method and adding a lint ignore comment. I don't see this as a security issue, and fixing properly would require refactoring the SQL queries.

Production Changes

The following production changes are required to deploy these changes:

Review

Check the box that applies to this code review. If necessary please seek help with adding a checklist guide for the reviewer. When assigning the code review please consider the expertise needed to review the changes.

Code Review Guide

Insert check list here if needed.