Skip to content

Assumption that order is unique is broken #260

@justuswilhelm

Description

@justuswilhelm

I use ordered model with order_with_respect_to set to something. No ordered item should ever have the same order as another item. So, I try to set in the Meta class, unique_together = ("foreign_key", "order"). When I run .to(order) I get an integrity error because to() temporarily moves around objects and violates the assumption that order is unique. Is there a workaround for this? My application seems to be plagued by accidental order overlaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions