'This is called automatically after the location field was
saved, no matter how. It checks for a variable
_safe_contents_update to know if the save was triggered via
the location handler (which updates the contents cache) or
not.
Args:
new (bool): Set if this location has not yet been saved before.'

def at_db_location_postsave(self, new):

    if (not hasattr(self, '_safe_contents_update')):
        if new:
            if self.db_location:
                self.db_location.contents_cache.add(self)
        else:
            logger.log_warn('db_location    direct    save    triggered    contents_cache.init()    for    all    objects!')
            [o.contents_cache.init() for o in self.__dbclass__.get_all_cached_instances()]
