jpwatts / django-positions

A Django field for custom model ordering.
BSD 3-Clause "New" or "Revised" License
284 stars 71 forks source link

Fixtures no longer import properly #29

Closed chriskief closed 10 years ago

chriskief commented 10 years ago

Up to 0.4.6, importing a fixture respected the position set in the fixture:

- fields: {name: Item 1, position: 0}
  model: app.item
  pk: 1
- fields: {name: Item 2, position: 1}
  model: app.item
  pk: 2
- fields: {name: Item 1, position: 2}
  model: app.item
  pk: 3
- fields: {name: Item 1, position: 3}
  model: app.item
  pk: 4

As of version 0.5.0 and continuing with 0.5.1, all rows imported end up with the last position (3 in this case).

I haven't had a chance yet to look at the code changes to see what is responsible for this bug.

jpadilla commented 10 years ago

:+1: Any chance this can get included in a new release?

jpwatts commented 10 years ago

I've merged the fix and will be making a new release.