[BUG] Avoid registering duplicated device when the status is flipping to compliant#2972
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@cubic-dev-ai ultrareview |
Contributor
@chasprowebdev Starting ultrareview - a deeper analysis than a regular review. I'll post findings when complete. |
Contributor
|
approved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated pull request to merge chas/device-duplication-bug into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Prevents duplicate device records when a device first registers without a serial and later reports one. The API now adopts the original serial-less row, and the macOS agent reads the serial more reliably.
registerWithSerial, adopt an existing device withserialNumber=nullscoped by hostname, member, and org before creating a new record; existing serial matches are updated in place.awk '{print $NF; exit}'to handle both “Serial Number” formats and avoid empty reads that caused duplicates.Written for commit 85f0b1e. Summary will update on new commits.