def story_node_add_arc_element_update_characters_locations(sender, instance, created, *args, **kwargs):
    '''
    If an arc element is added to a story element node, add any missing elements or locations.
    '''
    arc_node = ArcElementNode.objects.get(pk=instance.pk)
    logger.debug('Scanning arc_node %s' % arc_node)
    if arc_node.arc_element_type == 'root':
        logger.debug("root node. skipping...")
    else:
        logger.debug('Checking arc node for story element relationship...')
        if arc_node.story_element_node:
            logger.debug('Found a story element node for arc element...')
            # This change was initiated by the arc element node as opposed to the story node.
            story_node = arc_node.story_element_node
            if arc_node.assoc_characters.count() > 0:
                logger.debug('Found %d characters to add...' % arc_node.assoc_characters.count())
                for character in arc_node.assoc_characters.all():
                    story_node.assoc_characters.add(character)
            if arc_node.assoc_locations.count() > 0:
                logger.debug('Found %d locations to add...' % arc_node.assoc_locations.count())
                for location in arc_node.assoc_locations.all():
                    story_node.assoc_locations.add(location)
If an arc element is added to a story element node, add any missing elements or locations.