mcneilco / acas

http://mcneilco.com/acas.html
GNU General Public License v3.0
12 stars 5 forks source link

Download template does not fill endpoints when there are no experiments exist on the protocol #1101

Closed hhan-schrodinger closed 1 year ago

hhan-schrodinger commented 1 year ago

Description

When users would try to download template files when a protocol had no experiments associated with it, the download would fail. This is because to generate the template file, the backend logic finds all the endpoints associated with each experiment and compiles them to create the file. It doesn't look at the protocol's saved endpoints, and couldn't handle if there were no endpoints at all.

To fix, implemented new logic:

How Has This Been Tested?

Created three protocols: one with experiments uploaded associated with it, one with no experiments and no endpoints, and one with no experiments but several endpoints.

Tested downloading template files for each. The first protocol with experiments showed all endpoints in all experiments (expected behavior). The second one with no experiments and no endpoints had experiment metadata but no endpoints in the template file (expected behavior). The third protocol with no experiments but endpoints defined in the protocol showed the endpoints defined in the protocol (expected behavior).