As it is now you're allowed to delete a template even if other templates depend on it.
This causes the dependent templates to throw an exception if you attempt to use them in any way.
The client library, or siptrackweb, should perform a check to ensure that no template depends on a template being deleted.
Or offer a recursive delete option but that might be more work than it's worth right now.
Edit: Another alternative is to solve this in siptrackweb so that old templates can still be deleted even if their parents are gone.
As it is now you're allowed to delete a template even if other templates depend on it.
This causes the dependent templates to throw an exception if you attempt to use them in any way.
The client library, or siptrackweb, should perform a check to ensure that no template depends on a template being deleted.
Or offer a recursive delete option but that might be more work than it's worth right now.
Edit: Another alternative is to solve this in siptrackweb so that old templates can still be deleted even if their parents are gone.