USACE / cwms-data-api

Corps Water Management System RESTful Data Service
MIT License
13 stars 14 forks source link

/timeseries/group office id parameter doesn't return groups without a shared loc ref #137

Closed adamkorynta closed 8 months ago

adamkorynta commented 2 years ago

looks like it's filtering on the location office instead of the group's office.

rripken commented 2 years ago

PR #138 should fix this issue.

rripken commented 2 years ago

@adamkorynta can you remind me how you triggered this? I need to add an integration test for the PR but I'm having a hard time setting up the ts cat/group/tsId to demonstrate this. If I remember right you were mixing data from an office with data from CWMS office. I just tried to setup an integration test with data from two different offices (LRL and SPK) and I couldn't get the cwms_ts.store_group to use category and groups with different offices.
cwms_ts.assign_ts_group seems like it could handle dbOfficeId or db_office_code_all ("CWMS"). Probably be easiest if I just try to setup my test the same way things weren't working for you.