Skip to content

Commit

Permalink
Fix: don't jsonify Resource result
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed May 16, 2024
1 parent 502f3b9 commit 5d9e50b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mwdb/core/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
MethodNotAllowed,
ServiceUnavailable,
)
from werkzeug.wrappers import Response

from mwdb.version import app_version

Expand Down Expand Up @@ -45,10 +44,7 @@ def dispatch_request(self, *args, **kwargs):
valid_methods=self.methods,
description="Method is not allowed for this endpoint",
)
response = getattr(self, method)(*args, **kwargs)
if isinstance(response, Response):
return response
return jsonify(response)
return getattr(self, method)(*args, **kwargs)


class Service:
Expand Down

0 comments on commit 5d9e50b

Please sign in to comment.