Fix regression in findAnnotations() with 'id' or 'item' keys #2916

Closed
opened 2016-04-29 10:01:09 +00:00 by wjt · 1 comment

In #2912 I broke using 'id' and 'item' keys in findAnnotations() queries. Sorry! One-byte patch incoming.

In #2912 I broke using 'id' and 'item' keys in findAnnotations() queries. Sorry! One-byte patch incoming.
0x2620 added the
backend
label 2016-04-29 10:01:09 +00:00
0x2620 added this to the 14.04 milestone 2016-04-29 10:01:09 +00:00
j was assigned by 0x2620 2016-04-29 10:01:09 +00:00
0x2620 added the
normal
defect
labels 2016-04-29 10:01:09 +00:00
Will Thompson commented 2016-04-29 10:08:16 +00:00
Owner

In 2812834/pandora:

#!CommitTicketReference repository="pandora" revision="2812834ce3dc4794ed23b91fb56996fa323bed75"
findAnnotations: don't lowercase ids (fixes #2916)

Without this fix, a condition like:

     {key: 'id', operator: '==', value: 'A/B'}

gets mapped to:

     public_id__exact=('A/B'.lower())

which is wrong.

I introduced this bug in b3df5b8. I didn't catch it because I was
mostly interested in the 'layer' key -- but layer names are
conventionally lowercase anyway so lowercasing them had no effect.
In [2812834/pandora](https://code.0x2620.org/0x2620/pandora/commit/2812834ce3dc4794ed23b91fb56996fa323bed75): ``` #!CommitTicketReference repository="pandora" revision="2812834ce3dc4794ed23b91fb56996fa323bed75" findAnnotations: don't lowercase ids (fixes #2916) Without this fix, a condition like: {key: 'id', operator: '==', value: 'A/B'} gets mapped to: public_id__exact=('A/B'.lower()) which is wrong. I introduced this bug in b3df5b8. I didn't catch it because I was mostly interested in the 'layer' key -- but layer names are conventionally lowercase anyway so lowercasing them had no effect. ```
0x2620 added the
fixed
label 2016-04-29 10:08:16 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#2916
No description provided.