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 for empty policy list #10

Merged
merged 1 commit into from
Apr 16, 2019
Merged

fix for empty policy list #10

merged 1 commit into from
Apr 16, 2019

Conversation

nosanity
Copy link
Contributor

Empty policy list causes error
NameNotDefined 'p_sub' is not defined for expression ...
because the token is represented by tuple in this string

Empty policy list causes error
NameNotDefined 'p_sub' is not defined for expression ...
because the token is represented by tuple in this string
Copy link
Member

@hsluoyz hsluoyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments.

@@ -271,7 +271,7 @@ def enforce(self, *rvals):
for j, token in enumerate(self.model.model["r"]["r"].tokens):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable. Maybe for j, token in enumerate(self.model.model["r"]["r"].tokens): should also be changed? What do you think @techoner ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved these changes he made.

@leeqvip leeqvip merged commit ecd0fae into casbin:master Apr 16, 2019
@leeqvip leeqvip added the bug Something isn't working label Apr 16, 2019
TripleDogDare added a commit to TripleDogDare/pycasbin that referenced this pull request Apr 23, 2019
Add tests related to casbin#10

Signed-off-by: Calvin Behling <[email protected]>
TripleDogDare added a commit to TripleDogDare/pycasbin that referenced this pull request Apr 23, 2019
Add tests related to casbin#10

Signed-off-by: Calvin Behling <[email protected]>
TripleDogDare added a commit to TripleDogDare/pycasbin that referenced this pull request Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants