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

Buggy handling of "" or " " values for SelectBone #1363

Open
phorward opened this issue Jan 9, 2025 · 0 comments
Open

Buggy handling of "" or " " values for SelectBone #1363

phorward opened this issue Jan 9, 2025 · 0 comments
Labels
annoying bug(fix) Something isn't working or address a specific issue or vulnerability

Comments

@phorward
Copy link
Member

phorward commented Jan 9, 2025

#1361 wanted to introduce this RelSkel as part of a RecordBone:

class FilterRow(RelSkel):
    name = StringBone(
        required=True,
    )
    op = SelectBone(
        required=True,
        values={
            "": "=",
            "$lt": "<",
            "$gt": ">",
            "$lk": "like",
        },
        defaultValue=" ",
    )
    value = StringBone(
        required=True,
    )
    
filters = RecordBone(
    descr="Filter",
    using=FilterRow,
    multiple=True,
    format="$(name)$(op)=$(value)"
)

The SelectBone neither is able to process a value "", nor " ".

To my amazement, a " " is turned into a "_" when processed by ViUR, it seems that this is part of the gunicorn-stuff already, but I have to investigate.

Something is wrong here.

@phorward phorward added bug(fix) Something isn't working or address a specific issue or vulnerability annoying labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annoying bug(fix) Something isn't working or address a specific issue or vulnerability
Projects
None yet
Development

No branches or pull requests

1 participant