Running black on all files
This commit is contained in:
1 parent
3237824e83
commit
740dfc97c7
5 files changed
+63
-20
No files matched your search
+9
-3
@@ -113,7 +113,9 @@ async def seed() -> None:
|
||||
for name, description in PERMISSIONS:
|
||||
perm = await role_crud.get_permission_by_name(db, name)
|
||||
if perm is None:
|
||||
perm = await role_crud.create_permission(db, name=name, description=description)
|
||||
perm = await role_crud.create_permission(
|
||||
db, name=name, description=description
|
||||
)
|
||||
perms[name] = perm
|
||||
|
||||
# Roles
|
||||
@@ -151,10 +153,14 @@ async def seed() -> None:
|
||||
if pt is not None:
|
||||
for spt_name in spt_names:
|
||||
if (
|
||||
await sub_part_type_crud.get_by_name_and_part_type(db, spt_name, pt.id)
|
||||
await sub_part_type_crud.get_by_name_and_part_type(
|
||||
db, spt_name, pt.id
|
||||
)
|
||||
is None
|
||||
):
|
||||
await sub_part_type_crud.create(db, name=spt_name, part_type_id=pt.id)
|
||||
await sub_part_type_crud.create(
|
||||
db, name=spt_name, part_type_id=pt.id
|
||||
)
|
||||
|
||||
# Superuser
|
||||
existing = await user_crud.get_by_email(db, settings.first_superuser_email)
|
||||
|
||||
Reference in new issue
Block a user