Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2869

Review the usage of boolean values as filter parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: TVB Framework
    • Labels:
      None
    • Epic Link:
    • Sprint:
      VBC Sprint 11
    • TVB-C Task:
      6.3 SCAI Viewer Design

      Description

      I discovered an issue while working with filters, more specifically when filtering only connectivity measures that have surface mappings. In the ConnectivityMeasureIndex table the 'has_surface_mapping' is a boolean attribute and can have values 1 or 0, but in Python the filter value is 'True' (also as a boolean). The problem I think it is that when checking the filter conditions all values are converted to strings, so "1" is not equal to "True". If I change 'True' to '1' in the Python code, then it works as expected. This is when I used SQLite, I did not test on PostgreSQL.

      We should review the filters which have boolean values and make sure that they work as expected both in SQLite and PostgreSQL.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              robert.vincze Robert Francisc Vincze
              Reporter:
              robert.vincze Robert Francisc Vincze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours Time Not Required
                  3h