The cause of this bug was a race condition as both getBoxFlags and getDetails were executed at once. In some cases the flag details would return before the boxflags returned and updated the flaglist, resulting in it selecting the empty option.
This fix makes getBoxFlags return a promise which we now await before moving to getDetails.
Also noticed a jquery error when creating flags from a box link. As the create flag views aren't modals, removed data-toggle="modal" for these button links to fix.
Closes #585
The cause of this bug was a race condition as both getBoxFlags and getDetails were executed at once. In some cases the flag details would return before the boxflags returned and updated the flaglist, resulting in it selecting the empty option.
This fix makes getBoxFlags return a promise which we now await before moving to getDetails.
data-toggle="modal"
for these button links to fix.