ruff check
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
from fastapi import HTTPException, Body
|
||||
from fastapi import Body
|
||||
|
||||
from src.schemas.users import UserUpdate, User
|
||||
from src.schemas.users import UserUpdate
|
||||
from src.api.dependacies.user_dep import ActiveUser, AdminUser, CurrentOrAdmin
|
||||
from src.api.dependacies.db_dep import sessionDep
|
||||
from src.core.settings import settings
|
||||
|
||||
@@ -38,7 +38,7 @@ def upgrade():
|
||||
if constraint_name:
|
||||
try:
|
||||
batch_op.drop_constraint(constraint_name, type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
@@ -51,7 +51,7 @@ def downgrade():
|
||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||
try:
|
||||
batch_op.drop_constraint("fk_tasks_user_id_users", type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
|
||||
@@ -33,7 +33,7 @@ def upgrade():
|
||||
if "user_id" in fk["constrained_columns"]:
|
||||
try:
|
||||
batch_op.drop_constraint(fk["name"], type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
@@ -46,7 +46,7 @@ def downgrade():
|
||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||
try:
|
||||
batch_op.drop_constraint("fk_tasks_user_id_users", type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
batch_op.create_foreign_key(
|
||||
"fk_tasks_user_id_users", "users", ["user_id"], ["id"]
|
||||
|
||||
Reference in New Issue
Block a user