def create(self): node = Node() self.populate_obj(node) node.id = None try: node.check_and_save() node.deploy_async() return True except IntegrityError as e: logger.error(str(e)) self.hostname.errors.append(e.message)
def update(self, id): node = Node().get(Node.id == id) self.populate_obj(node) node.check_and_save()