Gustavo Picon is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

tabo / django-treebeard

Efficient tree implementations for Django 1.0+ :: https://tabo.pe/projects/django-treebeard/

Clone this repository (size: 602.0 KB): HTTPS / SSH
hg clone https://bitbucket.org/tabo/django-treebeard
hg clone ssh://hg@bitbucket.org/tabo/django-treebeard

Issues

#11 NS might be returning objects twice

Reported anonymously (last edited )

In some circumstances, which I am finding extremely hard to reproduce, NS tree returns an object twice.

If model Foo is a subclass of NS_Node, the query on the default manager Foo.objects.all() will return the first object twice, as the first and last object in the query (always).

Surprisingly, Foo.objects.filter() sometimes behaves appropriately and does not return any object twice, other times its output is identical to the problematic all().

This bug will only manifest after delete or move operations have been performed (i.e. even after tens of thousands of node creations, I have not witnessed it).

Status: resolved Responsible: nobody Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Gustavo Picon

    written

    • Changed status from new to resolved.

    This seems to be a node with data that wasn't updated after a write/delete/move operation because of raw queries.

    Please read the first warning in https://tabo.pe/projects/django-treebeard/docs/tip/api.html

Add comment / attachment

Show/hide preview

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?