Skip to content

fix: correct model reference in Node.BeforeUpdate hook#115

Open
Ember-Moth wants to merge 1 commit intoperfect-panel:developfrom
Ember-Moth:master
Open

fix: correct model reference in Node.BeforeUpdate hook#115
Ember-Moth wants to merge 1 commit intoperfect-panel:developfrom
Ember-Moth:master

Conversation

@Ember-Moth
Copy link
Copy Markdown
Contributor

The BeforeUpdate method was incorrectly using Model(&Server{}) instead of Model(&Node{}) when checking for duplicate sort values and getting the maximum sort value. This is a copy-paste error from the Server model.

  • Change Model(&Server{}) → Model(&Node{}) on line 49
  • Change Model(&Server{}) → Model(&Node{}) on line 61
  • Fix log tag from [Server] → [Node] on line 56 for consistency

This ensures that sort order maintenance works correctly for the nodes table, preventing duplicate sort values and data inconsistency.

The BeforeUpdate method was incorrectly using `Model(&Server{})` instead
of `Model(&Node{})` when checking for duplicate sort values and getting
the maximum sort value. This is a copy-paste error from the Server
model.

- Change Model(&Server{}) → Model(&Node{}) on line 49
- Change Model(&Server{}) → Model(&Node{}) on line 61
- Fix log tag from [Server] → [Node] on line 56 for consistency

This ensures that sort order maintenance works correctly for the nodes
table, preventing duplicate sort values and data inconsistency.
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.

1 participant