MultipleObjectsReturned when multiple software version entries in openskinsafelist table

Issue #960 resolved
David Platten created an issue

If there are multiple software version entries in the openskinsafelist table for a particular make / model of system causes a MultipleObjectsReturned error in the make_skin_map.py file

Comments (5)

  1. David Platten reporter

    Changed code to check for matching entry in openSkin safelist table to prevent ValueError. Previous code assumed only one entry would be returned, but if there are multiple entries in the table for the same make and model of equipment, but with differing software versions, multiple entries are returned. Refs issue #960

    → <<cset 3e081fdabc4d>>

  2. David Platten reporter

    A side note:

    I have changed:

    max_skin_dose = np.max(my_exp_map.my_dose.total_dose)

    to:

    max_skin_dose = np.max(my_exp_map.my_dose.total_dose, initial=0)

    Adding the initial=0 prevents a ValueError being thrown if the my_exp_map.my_dose.total_dose array is empty.

  3. David Platten reporter

    Enabled skin dose map tests. Changed reference skin dose map data to match the new code results. Added three additional entries in the json file of OpenSkinSafeList entries to ensure that the code implicitly works when there are multiple entries for the same make / model with different software versions. Refs issue #960

    → <<cset 3d874a8690f7>>

  4. David Platten reporter

    Stopped using the openskin_safelist.json file for skin dose map tests - creatin the table entries in the setup part of the test instead. Refs issue #960

    → <<cset e5bf55b25566>>

  5. Log in to comment