File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ Many packages aim to ease usage of Python enumerations as model fields. Most wer
104104 FlagExample.objects.create(permissions = Permissions.READ | Permissions.WRITE )
105105
106106 # get all models with RW:
107- FlagExample.objects.filter(permissions__all = Permissions.READ | Permissions.WRITE )
107+ FlagExample.objects.filter(permissions__has_all = Permissions.READ | Permissions.WRITE )
108108```
109109
110110## Complex Enumerations
Original file line number Diff line number Diff line change @@ -195,7 +195,8 @@ def test_flag_readme_ex(self):
195195
196196 self .assertEqual (
197197 MyModel .objects .filter (
198- permissions__all = MyModel .Permissions .READ | MyModel .Permissions .WRITE
198+ permissions__has_all = MyModel .Permissions .READ
199+ | MyModel .Permissions .WRITE
199200 ).count (),
200201 1 ,
201202 )
You can’t perform that action at this time.
0 commit comments