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

Ensure Model ID is unique #831

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

Gliese852
Copy link
Contributor

@Gliese852 Gliese852 commented Aug 28, 2023

The ID of the newly created model was obtained as the length of the array of models, but if some models "in the middle" were deleted, the new ID could be the same as the existing one.

We are sure that the last ID is the maximum, so we just take +1 than the last element.

UPDATE: Sorry, posted an unsigned commit first.

The ID of the newly created model was obtained as the length of the
array of models, but if some models "in the middle" were deleted, the
new ID could be the same as the existing one.

We are sure that the last ID is the maximum, so we just take +1 than the
last element.
@boltgolt boltgolt added this to the Release 3.0.0 milestone Sep 5, 2023
@boltgolt boltgolt merged commit 3cc017b into boltgolt:beta Sep 5, 2023
1 check passed
@boltgolt
Copy link
Owner

boltgolt commented Sep 5, 2023

Good catch, thank you so much!

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.

None yet

2 participants