Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Clinical-Genomics/genotype-api into…
Browse files Browse the repository at this point in the history
… plate-read-with-user
  • Loading branch information
mayabrandi committed Feb 14, 2022
2 parents 7b4c0ec + 1eeb330 commit d162fee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions genotype_api/api/endpoints/plates.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)
from genotype_api.crud.samples import create_analyses_sample_objects
from genotype_api.crud.plates import create_plate, get_plate
from genotype_api.crud.users import get_user_by_email
from genotype_api.database import get_session
from genotype_api.file_parsing.excel import GenotypeAnalysis
from genotype_api.file_parsing.files import check_file
Expand Down Expand Up @@ -62,8 +63,8 @@ def upload_plate(
@router.patch("/{plate_id}/sign-off", response_model=Plate)
def sign_off_plate(
plate_id: int,
method_document: str = Query(...),
method_version: str = Query(...),
method_document: int = Query(...),
method_version: int = Query(...),
session: Session = Depends(get_session),
current_user: User = Depends(get_active_user),
):
Expand All @@ -73,8 +74,8 @@ def sign_off_plate(
"""

plate: Plate = get_plate(session=session, plate_id=plate_id)

# plate.user = current_user
db_user = get_user_by_email(session=session, email=current_user.email)
plate.signed_by = db_user.id
plate.signed_at = datetime.now()
plate.method_document = method_document
plate.method_version = method_version
Expand Down

0 comments on commit d162fee

Please sign in to comment.