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

Prevent duplicate organization creation via website check #1514

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

yeganathan18
Copy link
Member

@yeganathan18 yeganathan18 commented Sep 18, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at bbfdb12

The pull request adds a new validation logic to prevent creating or updating duplicate organizations with different identities but the same website. It also adds a new method to query organizations by website domain in the OrganizationRepository class, which is used by the OrganizationService class in both backend/src/services/organizationService.ts and services/apps/data_sink_worker/src/service/organization.service.ts files.

🤖 Generated by Copilot at bbfdb12

create and upsert
check website and identity
avoiding duplicates

Why

How

🤖 Generated by Copilot at bbfdb12

  • Prevent duplicate organizations with different identities but same website by checking both website and primary identity before creating or updating organizations (link, link)
  • Add findByDomain method to OrganizationRepository class to query organizations by website domain in both backend/src/services/organizationService.ts and services/apps/data_sink_worker/src/service/organization.service.ts (link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@yeganathan18 yeganathan18 added the Improvement Created by Linear-GitHub Sync label Sep 18, 2023
@yeganathan18 yeganathan18 self-assigned this Sep 18, 2023
@yeganathan18 yeganathan18 merged commit a9a9715 into main Sep 19, 2023
8 checks passed
@yeganathan18 yeganathan18 deleted the bugfix/find-website-on-org-create branch September 19, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants