ucd-cws / PISCES

Software for tracking and analyzing fish species range data
Other
0 stars 2 forks source link

Fix species suggestion in Add or Modify Data to output error when multiple species are found #20

Closed nickrsan closed 12 years ago

nickrsan commented 12 years ago

Original report by Nicholas Santos (Bitbucket: nickrsan, GitHub: nickrsan).


Add a check for multiple species when doing autocomplete - if multiple species are found, print that instead. It seemed to have a problem with my approach, so logging this as a bug instead for now. The following should work with the right tracking in the main loop

if t_count > 1: # if we found multiple species
  self.params[field_num].value = "%s species found..." % (t_count) # output the error
elif t_count == 1:
  self.params[field_num].value = ts