Skip to content

Commit

Permalink
Merge pull request #1151 from microbiomedata/1148-get-submission-fix
Browse files Browse the repository at this point in the history
Fix broken GET submission endpoint
  • Loading branch information
naglepuff authored Feb 22, 2024
2 parents 806c824 + ed4bead commit b44467f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nmdc_server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@ async def get_submission(
elif user.orcid in submission.viewers:
permission_level = models.SubmissionEditorRole.viewer.value
return schemas_submission.SubmissionMetadataSchema(
**submission.__dict__,
status=submission.status,
id=submission.id,
metadata_submission=submission.metadata_submission,
author_orcid=submission.author_orcid,
created=submission.created,
author=schemas.User(**submission.author.__dict__),
locked_by=schemas.User(**submission.locked_by.__dict__),
permission_level=permission_level,
Expand Down
1 change: 1 addition & 0 deletions nmdc_server/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def do_ingest(function_limit, skip_annotation):
# Copy persistent data that does not depend on ingest FK
merge_download_artifact(ingest_db, prod_db.query(models.User))
merge_download_artifact(ingest_db, prod_db.query(models.SubmissionMetadata))
merge_download_artifact(ingest_db, prod_db.query(models.SubmissionRole))

# ingest data
logger.info(
Expand Down

0 comments on commit b44467f

Please sign in to comment.