Swarthmore / litterfall

Application and Scripts used for the Litterfall Project
0 stars 1 forks source link

Cannot get plot and site when adding new tree in a new, empty plot #52

Closed zafire06 closed 11 years ago

zafire06 commented 11 years ago

The way the codes currently work is that, when adding a new tree, a method in the Plot collection would get the plot number and the site name from the first Tree model in the collection. However, this would not work in a new, empty plot, since the add-new-tree method in the Plot collection would not be able to find any Tree model to get the site name and the plot number from.

There are two ways to fix this.

One is to get the site name and the plot number from the hidden fields in the header—like a part of the codes currently does for a different purpose.

Two is to define in the Plot collection the site name and the plot number. This makes more sense, but it is not necessary and can be more troublesome.