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
peewee_simple.py
AttributeError: 'Metadata' object has no attribute 'rel'
by running the example peewee_simple.py as is, I get
$ python peewee_simple.py Traceback (most recent call last): File "peewee_simple.py", line 42, in <module> api.add_resource(BookResource) File "/home/m/.local/share/virtualenvs/pano-vehicle-version-config-api-JCsed19j/lib/python3.6/site-packages/flask_potion/__init__.py", line 215, in add_resource resource.manager = self.default_manager(resource, resource.meta.get('model')) File "/home/m/.local/share/virtualenvs/pano-vehicle-version-config-api-JCsed19j/lib/python3.6/site-packages/flask_potion/contrib/peewee/manager.py", line 26, in __init__ super(PeeweeManager, self).__init__(resource, model) File "/home/m/.local/share/virtualenvs/pano-vehicle-version-config-api-JCsed19j/lib/python3.6/site-packages/flask_potion/manager.py", line 27, in __init__ self._init_model(resource, model, resource.meta) File "/home/m/.local/share/virtualenvs/pano-vehicle-version-config-api-JCsed19j/lib/python3.6/site-packages/flask_potion/contrib/peewee/manager.py", line 63, in _init_model if column.primary_key or name in model._meta.rel: AttributeError: 'Metadata' object has no attribute 'rel'
The text was updated successfully, but these errors were encountered:
maybe this is linked to #133? By changing
if column.primary_key or name in model._meta.rel: to if column.primary_key or name in model._meta.refs:, it fixes the error.
if column.primary_key or name in model._meta.rel:
if column.primary_key or name in model._meta.refs:
Sorry, something went wrong.
No branches or pull requests
by running the example
peewee_simple.py
as is, I getThe text was updated successfully, but these errors were encountered: