Skip to content

Commit

Permalink
Merge pull request #780 from hyanwong/fix-leaf_entry
Browse files Browse the repository at this point in the history
Fix #779
  • Loading branch information
hyanwong authored Apr 9, 2024
2 parents a926730 + d0fedcd commit b33aada
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ def sponsor_leaf_check(use_form_data, form_data_to_db):

elif status == 'invalid': # must define some null vars
response.view = request.controller + "/spl_invalid." + request.extension
return dict(OTT_ID=OTT_ID_Varin, species_name=leaf_entry.name)
return dict(
OTT_ID=OTT_ID_Varin,
species_name=T("No name") if leaf_entry is None else leaf_entry.name,
)

else:
# initialise other variables that will be passed on to the page
Expand Down

0 comments on commit b33aada

Please sign in to comment.