NHMDenmark / Mass-Digitizer

Common repo for the DaSSCo team
Apache License 2.0
1 stars 0 forks source link

Bug NHMA crashes the Digi app when taxon ID is entered #474

Closed jlegind closed 8 months ago

jlegind commented 8 months ago

Describe the bug When being logged in under NHMA and submitting a Taxonomic ID will crash the app.

To Reproduce Steps to reproduce the behavior:

  1. Log in under NHMA and choose NHMA Entomology
  2. Submit an ID number (any integer < 1000) in the Taxon number box
  3. Press Enter
  4. Fatal crash
  5. Log:
    [02-02 10:57:11] p20044 {DaSSCo.py:19} ERROR - No item with that key
    [02-02 10:57:11] p20044 {DaSSCo.py:21} ERROR - Traceback (most recent call last):
    File "DaSSCo.py", line 17, in main
    File "home_screen.py", line 74, in __init__
    File "home_screen.py", line 137, in main
    File "specimen_data_entry.py", line 86, in __init__
    File "specimen_data_entry.py", line 467, in main
    File "models\model.py", line 237, in setFields
    IndexError: No item with that key

Expected behavior A prompt stating that the ID number doesn't exist would be sufficient.

Please complete the following information:

Additional context As an aside: The app allows full taxonomy access even though one is logged in under NHMA and entomology.

FedorSteeman commented 8 months ago

Fixed and solution committed and pushed.