From 7a481bbdb7b5290204f3c69b78de8952e9dbb2d4 Mon Sep 17 00:00:00 2001 From: David Whittaker Date: Fri, 22 Sep 2023 10:34:54 -0700 Subject: [PATCH] Reformat --- src/dispatch/auth/permissions.py | 5 ++++- src/dispatch/incident/views.py | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dispatch/auth/permissions.py b/src/dispatch/auth/permissions.py index b06ad6af5f1b..d4936f03b3e4 100644 --- a/src/dispatch/auth/permissions.py +++ b/src/dispatch/auth/permissions.py @@ -348,7 +348,10 @@ def has_required_permissions( if not current_incident: return False - if current_incident.commander and current_incident.commander.individual.email == current_user.email: + if ( + current_incident.commander + and current_incident.commander.individual.email == current_user.email + ): return True scribes = [ diff --git a/src/dispatch/incident/views.py b/src/dispatch/incident/views.py index caa9acb430f6..dacfa5f04b7c 100644 --- a/src/dispatch/incident/views.py +++ b/src/dispatch/incident/views.py @@ -317,9 +317,7 @@ def create_custom_event( current_user: CurrentUser, background_tasks: BackgroundTasks, ): - event_in.details.update( - {"created_by": current_user.email, "added_on": str(datetime.utcnow())} - ) + event_in.details.update({"created_by": current_user.email, "added_on": str(datetime.utcnow())}) """Creates a custom event.""" background_tasks.add_task( event_flows.log_incident_event,