Skip to content

Commit 11cb330

Browse files
committed
Improve pymongo adapter
Signed-off-by: Andy Xia <118010339@link.cuhk.edu.cn>
1 parent eb39432 commit 11cb330

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

casbin_pymongo_adapter/adapter.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ class CasbinRule:
66
'''
77
CasbinRule model
88
'''
9-
ptype = None
10-
v0 = None
11-
v1 = None
12-
v2 = None
13-
v3 = None
14-
v4 = None
15-
v5 = None
16-
17-
def __init__(self, ptype):
9+
10+
def __init__(self, ptype = None, v0 = None, v1 = None, v2 = None, v3 = None, v4 = None, v5 = None):
1811
self.ptype = ptype
12+
self.v0 = v0
13+
self.v1 = v1
14+
self.v2 = v2
15+
self.v3 = v3
16+
self.v4 = v4
17+
self.v5 = v5
1918

2019
def dict(self):
2120
d = {'ptype': self.ptype}

0 commit comments

Comments
 (0)