Skip to content

Commit

Permalink
small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
panos-stavrianos committed Feb 28, 2024
1 parent 00eb56b commit 5cc5de3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion py_directus/directus_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, response: Union[Response, Coroutine, None] = None, query: dic
self.response_status: Optional[int] = None
self.query: dict = query
self.collection: Any = collection
self.json: Optional[dict] = None
self.json: Optional[dict] = {}
self.is_resolved: bool = False

self.parse_response()
Expand All @@ -42,6 +42,8 @@ def parse_response(self):

try:
self.json = self.response.json()
if self.json is None:
self.json = {}
if self.is_error:
raise DirectusException(self)
except jsonlib.decoder.JSONDecodeError:
Expand Down

0 comments on commit 5cc5de3

Please sign in to comment.