raddevon / flask-permissions

A simple permissions system for Flask
MIT License
140 stars 48 forks source link

sqlalchemy.orm.exc.UnmappedColumnError #16

Open asura-10 opened 7 years ago

asura-10 commented 7 years ago

I download this package by pip, the version is 0.2.3, error has occurred: sqlalchemy.orm.exc.UnmappedColumnError: Can't execute sync rule for source column 'fp_user.id'; mapper 'Mapper|UserMixin|fp_user' does not map this column. Try using an explicit foreign_keys collection which does not include destination column 'fp_user_role.user_id' (or use a viewonly=True relation).

how to solve this problem~ if I clone package from github,choose the newest version,error has occurred: AttributeError: 'str' object has no attribute 'fget'

asura-10 commented 7 years ago

file: flask-permissions/flask_permissions/models.py line: 131 change to: self._id_column_name)

bug is fixed.