You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
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
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
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(' ')])
inrule_manager.py
functionrewrite_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 exampleTest
andtest
).Error Message:
When creating the second rewriting rule, this error message should appear in the console and not add the second rule.
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 thekey
column as it will not affect any existing queries and the rule can still be identified through the attributesid
anduser_id
The text was updated successfully, but these errors were encountered: