Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Fix search 1438 #1451

Merged
merged 4 commits into from
Jul 17, 2018
Merged

Fix search 1438 #1451

merged 4 commits into from
Jul 17, 2018

Conversation

MatthewDorner
Copy link
Contributor

@MatthewDorner MatthewDorner commented Jun 25, 2018

Fixes #1438.

Changes proposed in this pull request:
The relational-pouch method parseRelDocs() doesn't filter based on the record type you give it. Actually, it just "parses" any resulting records, of any type, into that record type. So you need to explicitly filter on type in your call to db.find().

It's possible this will be changed in relational-pouch, so I put a comment in the code describing it as a workaround. See these threads for discussion of the same issue:
pouchdb-community/ember-pouch#168
pouchdb-community/ember-pouch#194

cc @HospitalRun/core-maintainers

* Make search results filter on type.

* Reduced size of new code.

* Replace newline.

* Reduce code size.

* Fixed tests.
@stukalin stukalin merged commit 33ce152 into HospitalRun:master Jul 17, 2018
@MatthewDorner MatthewDorner deleted the fix-search-1438 branch August 14, 2018 02:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants