Updates the calculated intervals in the database. Performs an upsert

        :param intervals: The calculated intervals
        :return: None

def calculated_intervals(self, intervals):
        """
        Updates the calculated intervals in the database. Performs an upsert

        :param intervals: The calculated intervals
        :return: None
        """
        logging.debug("set calculated intervals")
        self.mongo_model.set_calculated_intervals(intervals)
        self.save()
        self._calculated_intervals = TimeIntervals(intervals)