potion icon indicating copy to clipboard operation
potion copied to clipboard

AttributeError: 'module' object has no attribute 'fields'

Open lohxx opened this issue 5 years ago • 0 comments

This error is raised when i try to instantiate the InlineModel class.

Extension version: 0.16.0

code

from flask_potion.contrib import alchemy


    @ItemRoute.GET('/collapsed_credit_usage_user', Schema=FieldSet({
        'user': alchemy.fields.InlineModel({
            'id': fields.Integer(description='id do usuario')
        }, model=model_user.User)
        })
    )
    def collapsed_credit_usage_user(self, invoice, user):
        pass

Can anyone explain why is this happening?

lohxx avatar Mar 07 '19 16:03 lohxx