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

[Bug] [FE+BE] Inserting rules with an existing rule name fails. #4

Open
seongjinyoon opened this issue Aug 4, 2023 · 0 comments
Open

Comments

@seongjinyoon
Copy link
Collaborator

Issue Description:

I am encountering an issue while attempting to create a rewriting rule with case sensitive names. For example, if I create a rewriting rule named "Test" and another called "test", this causes a UNIQUE constraint error. This is due to the key being produced as '_'.join([word.lower() for word in str(rule['name']).split(' ')]) in rule_manager.py function rewrite_rule() where the key value is derived from the name of the rule.

Steps to Reproduce:

Go to Rewriting Rules tab and create or edit two queries with two identical names that are case sensitive (For example Test and test).

Error Message:

When creating the second rewriting rule, this error message should appear in the console and not add the second rule.
Screenshot 2023-08-04 at 3 59 24 PM

Proposed Solution:

The key attribute is redundant and is not being used by any queries inside our program. This issue can be solved by removing the key column as it will not affect any existing queries and the rule can still be identified through the attributes id and user_id

@baiqiushi baiqiushi changed the title Table "rules" contains redundant attribute "key" which causes an error while creating rewriting rules with case sensitive names. [Bug] Inserting rules with an existing rule name fails. Jun 2, 2024
@baiqiushi baiqiushi changed the title [Bug] Inserting rules with an existing rule name fails. [Bug] [FE+BE] Inserting rules with an existing rule name fails. Jun 2, 2024
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

No branches or pull requests

1 participant