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

fix/new group add #59

Open
sheraztariq007 opened this issue Jun 15, 2022 · 0 comments
Open

fix/new group add #59

sheraztariq007 opened this issue Jun 15, 2022 · 0 comments

Comments

@sheraztariq007
Copy link

sheraztariq007 commented Jun 15, 2022

Environment:


Name: Flask-Authorize
Version: 0.2.6
            Name: Flask-Authorize
            Version: 0.2.6
            
            Name: Flask
            Version: 2.1.2
            
            Name: Flask-SQLAlchemy
            Version: 2.5.1
            
            Name: six
            Version: 1.16.0
            
            Name: SQLAlchemy
            Version: 1.4.37


Python version: Python 3.8.10

I tried to create Group by using usual way like:

group_admin = Group(name='admin')
group_admin.set_restrictions(can_delete=True)
db.session.add(group_admin)
db.session.commit()

but i got following error:


    restrictions = self.restrictions.copy()
AttributeError: 'NoneType' object has no attribute 'copy'

i think here you are trying to copy restriction variable.. i updated it to __restrictions__ --> restrictions in mixins.py file and it worked fine.

Please guide if this behavior is right.

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

1 participant