Skip to content

feat: remove _id check for inserts #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2025
Merged

Conversation

helen-m-lin
Copy link
Collaborator

@helen-m-lin helen-m-lin marked this pull request as ready for review June 12, 2025 19:05
@helen-m-lin helen-m-lin requested review from jtyoung84 and dbirman June 12, 2025 19:05
@@ -429,7 +429,10 @@ def aggregate_docdb_records(self, pipeline: List[dict]) -> List[dict]:

def insert_one_docdb_record(self, record: dict) -> Response:
"""Insert one new record"""
if record.get("_id") is None:
is_managed_collection = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better if this logic is handled by the API Gateway. Maybe we can get rid of this check here and just let the api gateway return an error code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the _id check for inserts from the client to the lambda function.

@helen-m-lin helen-m-lin changed the title feat: do not require _id for managed collection feat: remove _id check for inserts Jun 13, 2025
@helen-m-lin helen-m-lin requested a review from jtyoung84 June 13, 2025 18:21
@helen-m-lin helen-m-lin merged commit afaa7f2 into dev Jun 18, 2025
3 checks passed
@helen-m-lin helen-m-lin deleted the feat-managed-v2-collection branch June 18, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants