jacebrowning / jacebrowning/datafiles

Model.objects.all() does not convert types in primary keys

Open
#147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Python
Stars
213
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
5

Description

See this test reproducing the failure:

https://github.com/jacebrowning/datafiles/blob/e8fc6fd7be8ab15897facfcfa5cc91982849958b/tests/test_orm_usage.py#L75-L80

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducing test in tests/test_orm_usage.py at lines 75-80. Trace the Model.objects.all() path from that test and verify that primary-key values are converted to their declared types; done means the reproduction passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.