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

[Rules] Fix rule updates regression that affected bot booting checks #2841

Merged
merged 1 commit into from Feb 6, 2023

Conversation

Akkadius
Copy link
Member

@Akkadius Akkadius commented Feb 6, 2023

What

During bootup of a server, when bot tables exist but the rule is not enabled or set, there will be a query error that shows up each time the server is booted - making operators think that there is an issue.

This fixes a regression in #2593 that caused rules to not be able to be updated if they already exist. The table does not have a primary key (such as id) to bind to in order for the UpdateOne to work properly.

This change replaces it with a raw update to restore functionality.

World |  QueryErr  | QueryDatabase [1064] [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rule_notes = 'Enable of disable bot functionality, default is false' WHERE ru...' at line [1
UPDATE] rule_values SET rule_value = true rule_notes = 'Enable of disable bot functionality, default is false' WHERE ruleset_id = 1 AND rule_name = 'Bots:Enabled'] 

@Akkadius Akkadius merged commit 2b224d4 into master Feb 6, 2023
@Akkadius Akkadius deleted the akkadius/fix-rule-updating branch February 6, 2023 23:31
@Akkadius Akkadius mentioned this pull request Feb 7, 2023
catapultam-habeo pushed a commit to catapultam-habeo/pyrelight-server that referenced this pull request Mar 27, 2023
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