Fix not matching documentation comments

This commit is contained in:
linuskmr 2021-12-23 18:35:25 +01:00
parent b382beb5a6
commit e70436104b

View file

@ -37,13 +37,13 @@ async def add_tag(
return db_tag return db_tag
@router.get("/{name}", response_model=TagRead, summary="Get a project by name") @router.get("/{name}", response_model=TagRead, summary="Get a tag by name")
async def get_tag( async def get_tag(
*, *,
name: str = Path(..., title="Name of the tag"), name: str = Path(..., title="Name of the tag"),
session: Session = Depends(database.get_session) session: Session = Depends(database.get_session)
) -> Tag: ) -> Tag:
"""Fetch a project by name.""" """Fetch a tag by name."""
try: try:
tag = session.exec(select(Tag).where(Tag.name == name)).one() tag = session.exec(select(Tag).where(Tag.name == name)).one()