From d74159a930d272289210139898cb664ded84886b Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Wed, 11 Oct 2023 15:00:32 -0700 Subject: [PATCH] Fixes indentation. --- src/dispatch/conversation/flows.py | 36 ++++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/dispatch/conversation/flows.py b/src/dispatch/conversation/flows.py index c0b1384d7949..e13333b37883 100644 --- a/src/dispatch/conversation/flows.py +++ b/src/dispatch/conversation/flows.py @@ -51,26 +51,28 @@ def create_case_conversation(case: Case, conversation_target: str, db_session: S f"Conversation not created. Plugin {plugin.plugin.slug} encountered an error." ) return - conversation.update({"resource_type": plugin.plugin.slug, "resource_id": conversation["id"]}) + conversation.update( + {"resource_type": plugin.plugin.slug, "resource_id": conversation["id"]} + ) - conversation_in = ConversationCreate( - resource_id=conversation["resource_id"], - resource_type=conversation["resource_type"], - weblink=conversation["weblink"], - thread_id=conversation["timestamp"], - channel_id=conversation["id"], - ) - case.conversation = create(db_session=db_session, conversation_in=conversation_in) + conversation_in = ConversationCreate( + resource_id=conversation["resource_id"], + resource_type=conversation["resource_type"], + weblink=conversation["weblink"], + thread_id=conversation["timestamp"], + channel_id=conversation["id"], + ) + case.conversation = create(db_session=db_session, conversation_in=conversation_in) - event_service.log_case_event( - db_session=db_session, - source=plugin.plugin.title, - description="Case conversation created", - case_id=case.id, - ) + event_service.log_case_event( + db_session=db_session, + source=plugin.plugin.title, + description="Case conversation created", + case_id=case.id, + ) - db_session.add(case) - db_session.commit() + db_session.add(case) + db_session.commit() return case.conversation