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: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 1 additions and 1 deletions

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 = {