This PR modifies the Edit Critter page to correctly handle the case where the taxon changes, which affects the validity of collection units and markings. If you try to change the taxon of a critter that has markings which have fields not inherited by the new taxon, a pop-up will show and you will be prevented from switching. Removing the offending markings allows you to switch. Switching taxons successfully will also change the available collection units now. There is a check in the payload builder that will add _delete keys to markings on the condition that they already have primary keys and the new payload has a different taxon_id from the existing critter entry.
This PR modifies the Edit Critter page to correctly handle the case where the taxon changes, which affects the validity of collection units and markings. If you try to change the taxon of a critter that has markings which have fields not inherited by the new taxon, a pop-up will show and you will be prevented from switching. Removing the offending markings allows you to switch. Switching taxons successfully will also change the available collection units now. There is a check in the payload builder that will add _delete keys to markings on the condition that they already have primary keys and the new payload has a different taxon_id from the existing critter entry.