A cleaner way of calculating the success response attribute.

This commit is contained in:
Fabio Manganiello 2023-02-25 01:58:09 +01:00
parent 2dfb389630
commit 70d1bb893c
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -78,7 +78,7 @@ class Response(Message):
the message into a UTF-8 JSON string
"""
output = (
self.output if self.output is not None else {'success': bool(self.errors)}
self.output if self.output is not None else {'success': not self.errors}
)
response_dict = {