Skip to content

Commit

Permalink
Reversed odd changes to services
Browse files Browse the repository at this point in the history
  • Loading branch information
christophertubbs committed Nov 2, 2023
1 parent 69f83f7 commit 6671a35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ async def receive(self, text_data=None, **kwargs):
return

try:
if not payload.get('action', ):
if not payload.get('action'):
message = f"{str(self)}: No action was received; expected action cannot be performed"
SOCKET_LOGGER.error(message)
await self.send_error(event='receive', message=message, request_id=kwargs.get(REQUEST_ID_KEY))
Expand All @@ -609,7 +609,7 @@ async def receive(self, text_data=None, **kwargs):

action = payload['action']
handler = getattr(self, action)
action_parameters = payload.get('action_parameters', )
action_parameters = payload.get('action_parameters')

if hasattr(handler, "required_parameters"):
parameters = getattr(handler, "required_parameters") # type: dict[str, str]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ async def echo_message(
try:
data = json.loads(message)
if 'should_print' in data:
should_print = bool(data.get('should_print', ))
should_print = bool(data.get('should_print'))
except:
pass

Expand Down

0 comments on commit 6671a35

Please sign in to comment.