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

Deferred models do not play nicely with related fields. #6

Closed
charettes opened this issue Jan 3, 2014 · 1 comment
Closed

Deferred models do not play nicely with related fields. #6

charettes opened this issue Jan 3, 2014 · 1 comment
Labels

Comments

@charettes
Copy link
Owner

The following will raised an exception.

class A(TenantModel):
    pass

class B(TenantModel):
    a = models.ForeignKey(A, related_name='b_set')

a = A.objects.create()
a.b_set.only('a').get()  # <- Cannot assign a to ...
@charettes
Copy link
Owner Author

We should investigate if this still happen with Django > 1.10 as field deferring don't rely on proxy models anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant