Code

Opened 2 years ago

Closed 2 years ago

#17264 closed Uncategorized (needsinfo)

in_bulk should prep the values with get_prep_value of the model's pk field

Reported by: anonymous Owned by: nobody
Component: Database layer (models, ORM) Version:
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

currently in_bulk just does filter(pkin=id_list), but id_list should have its values cleaned with the model's pk field's get_prep_value function before filtering.

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by akaariai

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

It would make it easier to review this ticket if you provided an example of why this is needed.

comment:2 Changed 2 years ago by ptone

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Resolution set to needsinfo
  • Status changed from new to closed

More info is needed - it is not clear why such behavior would make sense, when it should be consistent with any other queryset operations

It should be the same as qs.filter(pkin=[...])

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.