Skip to content
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

Ignore the visit that comes again from hq with same form data #444

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hemant10yadav
Copy link
Contributor

@hemant10yadav hemant10yadav commented Dec 4, 2024

@hemant10yadav hemant10yadav marked this pull request as draft December 4, 2024 03:05
@hemant10yadav hemant10yadav marked this pull request as ready for review December 4, 2024 03:56
@hemant10yadav hemant10yadav marked this pull request as draft December 5, 2024 06:54
Copy link
Collaborator

@calellowitz calellowitz left a comment

Choose a reason for hiding this comment

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

This might be nicer as a database level constraint, and then we can catch that db exception in the processor code and respond with an appropriate message. That saves us the extra db hit (its normally just a write that succeeds, and occasionally a write that fails), and enforces the lack of duplicates at the db level, rather than needing to catch it in code each place.

At a minimum we can ensure (xform_id, entity_id, deliver_unit) are unique together.

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