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

TypeError: is_active() got an unexpected keyword argument 'read_only' #474

Open
cclauss opened this issue Oct 1, 2022 · 3 comments
Open

Comments

@cclauss
Copy link
Contributor

cclauss commented Oct 1, 2022

I am upgrading from django-waffle==0.19.0 to current django-waffle on Django 3.1.
I am getting the above TypeError which seems to be related to the changes made in #447.
Are there any hints on how to modify existing code the deal with the read_only change?

@clintonb
Copy link
Collaborator

clintonb commented Oct 1, 2022

@cclauss can you share a stack trace, please?

@rossasarus
Copy link

@cclauss Did you ever resolve this? I'm hitting the same thing.

@cclauss
Copy link
Contributor Author

cclauss commented May 31, 2023

This fix worked for me but unfortunately, it is not an open source project so I cannot add any further details...

flags/models.py: Add a read_only parameter to is_active() to support modern versions of django-waffle.

-    def is_active(self, request):
+    def is_active(self, request, read_only=False):

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

3 participants