Skip to content

AB#32538: Prevent creation of multiple Sites with Same Number#2226

Merged
JamesPasta merged 2 commits into
devfrom
bugfix/AB#32538-Prevent-Duplicate-Sites
Apr 7, 2026
Merged

AB#32538: Prevent creation of multiple Sites with Same Number#2226
JamesPasta merged 2 commits into
devfrom
bugfix/AB#32538-Prevent-Duplicate-Sites

Conversation

@aurelio-aot
Copy link
Copy Markdown
Contributor

Addresses a PROD issue where a supplier could end up with multiple Site rows sharing the same Number.
Three fixes applied:

  • UpsertSupplierHandler: Deduplicate incoming SiteEtos by SupplierSiteCode before the upsert loop — prevents duplicates when CAS returns duplicate site codes in a single event payload.
  • SiteAppService.InsertAsync: Check for an existing site with the same SupplierId + Number before inserting. If found, update it instead — makes the method idempotent and guards against concurrent upsert calls.
  • SupplierInfo.js: Disable the "Refresh Site List" button while the AJAX request is in flight and re-enable it on completion — prevents multiple concurrent refresh requests from being fired by rapid clicks.

@aurelio-aot aurelio-aot requested a review from JamesPasta April 6, 2026 23:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@JamesPasta JamesPasta merged commit 8f7ddac into dev Apr 7, 2026
22 checks passed
@JamesPasta JamesPasta deleted the bugfix/AB#32538-Prevent-Duplicate-Sites branch April 7, 2026 16:02
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