From 1d84ab6288f9181fb5a923556db82d1311fbd364 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:27:31 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../app/organization/organization_crud.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/backend/app/organization/organization_crud.py b/src/backend/app/organization/organization_crud.py index f150277e70..e7fabe9777 100644 --- a/src/backend/app/organization/organization_crud.py +++ b/src/backend/app/organization/organization_crud.py @@ -19,14 +19,16 @@ import random import re import string +from io import BytesIO from fastapi import HTTPException, UploadFile from loguru import logger as log from sqlalchemy import func from sqlalchemy.orm import Session -from app.s3 import add_obj_to_bucket + from app.config import settings -from io import BytesIO +from app.s3 import add_obj_to_bucket + from ..db import db_models IMAGEDIR = "app/images/" @@ -102,10 +104,12 @@ async def create_organization( file_obj = BytesIO(file_bytes) # Upload image in s3 - add_obj_to_bucket(settings.S3_BUCKET_NAME, - file_obj, - f"/organisation_logo/{logo.filename}", - content_type=logo.content_type) + add_obj_to_bucket( + settings.S3_BUCKET_NAME, + file_obj, + f"/organisation_logo/{logo.filename}", + content_type=logo.content_type, + ) # create new organization object db_organization = db_models.DbOrganisation(