We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This does not work:
class ModelData(prom.extras.testdata.ModelData): def get_<MODEL_NAME>_fields(self, **kwargs): instance = self.get_<OTHER_MODEL_NAME>(**kwargs)
because calling self.get_<OTHER_MODEL_NAME> passes in the orm_class and overrides the magic get_<OTHER_MODEL_NAME> resolver.
self.get_<OTHER_MODEL_NAME>
orm_class
get_<OTHER_MODEL_NAME>
I was able to get it to work doing this:
class ModelData(prom.extras.testdata.ModelData): def get_<MODEL_NAME>_fields(self, **kwargs): orm_class = kwargs.pop("orm_class") instance = self.get_<OTHER_MODEL_NAME>(**kwargs)
But I'd love to get it to work automatically somehow, no idea how to do it yet though, or even if it is possible.
The text was updated successfully, but these errors were encountered:
faa35f7
No branches or pull requests
This does not work:
because calling
self.get_<OTHER_MODEL_NAME>
passes in theorm_class
and overrides the magicget_<OTHER_MODEL_NAME>
resolver.I was able to get it to work doing this:
But I'd love to get it to work automatically somehow, no idea how to do it yet though, or even if it is possible.
The text was updated successfully, but these errors were encountered: