Skip to content

Read the stored string from on-premise Device Detection when a derived property script compares a property with text #153

Open

Description

@jwrosewell

On-premise Device Detection reads every Boolean property in device-detection/fiftyone_devicedetection_onpremise/src/fiftyone_devicedetection_onpremise/swig_data.py with getValueAsBool, which answers value == "True" (ResultsBase.cpp lines 118 to 140). So a Boolean property the data file stores as Unknown reaches Python as False. derived-properties#1 gives the cause.

A derived property script that compares a Boolean property with the text "Unknown" therefore never sees that value through on-premise Device Detection in Python, which the derived property element of the draft #125 cannot tell apart. .NET reads the stored string (IProvidesValuesAsString) where a script compares a property with text, and 51degrees-php#95 is the same gap in PHP. The free Lite file does not carry the Boolean properties stored as Unknown, so this needs the Enterprise or TAC file to check.

What to do: give SwigData a way to hand back a property's stored string, have DerivedPropertyElement use it where a script infers string for the property, and prove it with a test on the TAC file CI fetches, using a Boolean property that file stores as Unknown.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions