'Deletes all external service associations.'

def delete_external_service_associations(self, trans):

    flush_needed = False
    for rtesa in self.external_service_associations:
        trans.sa_session.delete(rtesa)
        flush_needed = True
    if flush_needed:
        trans.sa_session.flush()
