Skip to content

Commit 55aa73a

Browse files
committed
fix for newer python versions
1 parent 2c101f0 commit 55aa73a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fastapi_jsonapi/atomic/prepared_atomic_operation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def prepare(
3838
) -> "OperationBase":
3939
view_cls: Type[ViewBase] = jsonapi.detail_view_resource
4040

41+
if hasattr(action, "value"):
42+
# convert to str if enum
43+
action = action.value
44+
4145
if action == AtomicOperationAction.add:
4246
operation_cls = OperationAdd
4347
view_cls = jsonapi.list_view_resource

0 commit comments

Comments
 (0)