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

Django factory subclasses break with 'app.Model' #117

Closed
mjtamlyn opened this issue Dec 22, 2013 · 2 comments
Closed

Django factory subclasses break with 'app.Model' #117

mjtamlyn opened this issue Dec 22, 2013 · 2 comments

Comments

@mjtamlyn
Copy link

If you try to make a subclass of a factory declared using the 'app.Model' syntax for FACTORY_FOR (introduced from #66) then the metaclass falls over when it does an issubclass check. This is because it still has a string and has not resolved it into a class yet.

I don't quite understand the difference between _discover_associated_class() and _load_target_class(), except that one is a function of the Metaclass and the other of the resultant class. Because the Django customisation only exists in the resultant class using _load_target_class() this falls over.

@rbarrois
Copy link
Member

I think this has been already reported in #109; could you check if the issue is still active with the current "master" version?

I'm preparing a 2.3.0 release by the end of the year.

@rbarrois
Copy link
Member

Version 2.3.0 has been released, and should fix this; feel free to reopen if this isn't the case.

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

No branches or pull requests

2 participants