Skip to content

Commit

Permalink
feat: fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
OlhaD committed Mar 3, 2023
1 parent 334c406 commit ae2bb9e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions server/infra/database/GrowerAccountRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@ export default class GrowerAccountRepository extends BaseRepository<GrowerAccoun
delete filterObject.device_identifier;
}

if (filterObject.phone) {
result.where(
`${this.tableName}.phone`,
'ilike',
`%${filterObject.phone}%`,
);
delete filterObject.phone;
if (filterObject.organization_id) {
result.where(`${this.tableName}.organization_id`, 'in', [
...filterObject.organization_id,
]);
delete filterObject.organization_id;
}

// if 'captures_amount_max' === 0, 'captures_amount_min' can be only 0.
Expand Down

0 comments on commit ae2bb9e

Please sign in to comment.