Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments. #2487

Merged
merged 1 commit into from Mar 30, 2014

Commits on Mar 30, 2014

  1. Fixed #19816 -- Pre-evaluate querysets used in direct relation assign…

    …ments.
    
    Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
    followed by an `add()`, `clear()` could potentially affect the value of the
    assigned queryset before the `add()` step; pre-evaluating it solves the problem.
    
    This patch fixes the issue for ForeignRelatedObjectsDescriptor,
    ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
    It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
    loic committed Mar 30, 2014
    Copy the full SHA
    2039908 View commit details
    Browse the repository at this point in the history