Skip to content

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

Merged
web-ppanel merged 1 commit into
perfect-panel:developfrom
Ember-Moth:master
May 10, 2026
Merged

fix: correct model reference in Node.BeforeUpdate hook#115
web-ppanel merged 1 commit into
perfect-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.
@Ember-Moth Ember-Moth closed this Apr 21, 2026
@Ember-Moth Ember-Moth deleted the master branch April 21, 2026 13:38
@Ember-Moth Ember-Moth restored the master branch May 10, 2026 06:39
@Ember-Moth Ember-Moth reopened this May 10, 2026
@web-ppanel web-ppanel merged commit e4b4243 into perfect-panel:develop May 10, 2026
0 of 2 checks passed
@Ember-Moth Ember-Moth deleted the master branch May 15, 2026 07:33
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