Skip to content

Commit

Permalink
BugFix: Ambiguous Survey ID in Find Animals SQL (#1361)
Browse files Browse the repository at this point in the history
* fix ambiguous survey_id reference

* linter
  • Loading branch information
mauberti-bc authored Sep 11, 2024
1 parent 0d0f2f2 commit 027d8eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/repositories/survey-critter-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export class SurveyCritterRepository extends BaseRepository {
* @memberof SurveyCritterRepository
*/
_makeFindCrittersQuery(isUserAdmin: boolean, systemUserId: number | null, filterFields?: IAnimalAdvancedFilters) {
const query = getKnex().select(['critter_id', 'survey_id', 'critterbase_critter_id']).from('critter');
const query = getKnex()
.select(['critter.critter_id', 'critter.survey_id', 'critter.critterbase_critter_id'])
.from('critter');

if (!isUserAdmin) {
query
Expand Down

0 comments on commit 027d8eb

Please sign in to comment.