Renaming Occular to Ocular
This commit is contained in:
1 parent
ce2bdc43a8
commit
a35d064e32
2 files changed
+14
-36
No files matched your search
+4
-10
@@ -17,7 +17,7 @@ from app.crud import role as role_crud
|
||||
from app.crud import sub_part_type as sub_part_type_crud
|
||||
from app.crud import user as user_crud
|
||||
|
||||
ATTACHMENT_POINT_NAMES = ["Objective", "Occular"]
|
||||
ATTACHMENT_POINT_NAMES = ["Objective", "Ocular", "Rail"]
|
||||
|
||||
PART_TYPES = ["Flip Cover", "ARD", "Polarizer", "Adapter Ring", "Scope"]
|
||||
|
||||
@@ -113,9 +113,7 @@ 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
|
||||
@@ -153,14 +151,10 @@ 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