Skip to content

Commit 124de98

Browse files
author
Colton Provias
committed
Finished refactor, but now permissions will be a challenge.
1 parent 0125617 commit 124de98

5 files changed

Lines changed: 388 additions & 168 deletions

File tree

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[pytest]
2-
addopts = --cov=sqlalchemy_jsonapi --cov-report=term-missing --ff
2+
addopts = -x --ff
33
norecursedirs = lib include bin docs *.egg .*

sqlalchemy_jsonapi/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class PermissionDeniedError(BaseError):
5151

5252
def __init__(self, permission, model, instance=None, field=None):
5353
tmpl = '{} denied on {}'
54-
self.detail = tmpl.format(permission.value, model.__jsonapi_type__)
54+
self.detail = tmpl.format(permission.name, model.__jsonapi_type__)
5555
if instance is not None:
5656
self.detail += '.' + str(instance.id)
5757
if field is not None:

0 commit comments

Comments
 (0)