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:
None
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.
[ ] This is a content (documentation, web page etc) only change.
[ ] This is a minor change (meta data, bug fix, improve test coverage etc).
[ ] This is a larger change (new feature, significant refactoring etc). Please use the code review guidelines to add a checklist below to guide the code reviewer.
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.