Commit 0c7e3b6
committed
Add support for non-pk IDs to get_qualified_id
The `CustomQuerySetIndex` `get_qualified_id` method now takes the full
record object to help formulate the ID, rather than assuming it's the
record PK. This adds support for using alternative fields as IDs (in
Solr) on subclasses; they can override that method to provide a
different ID. Fixtures in the main conftest.py file have been updated as
well to utilize `get_qualified_id` rather than putting together the ID
manually. (I think this was always my intention, but I forgot to
implement it.)1 parent 589a517 commit 0c7e3b6
2 files changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
570 | 569 | | |
571 | 570 | | |
572 | 571 | | |
573 | 572 | | |
574 | 573 | | |
575 | 574 | | |
576 | | - | |
577 | | - | |
| 575 | + | |
578 | 576 | | |
579 | 577 | | |
580 | 578 | | |
| |||
0 commit comments