def save_object(self, obj):
        """
        Save an object to the db
        :param obj: the object to save
        :return: the saved object
        """
        self.session.add(obj)
        self.session.flush()
        return obj
Save an object to the db
        :param obj: the object to save
        :return: the saved object