maxkb/apps/function_lib/views/common.py
2025-03-25 19:07:02 +08:00

21 lines
485 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding=utf-8
"""
@project: MaxKB
@Author
@file common.py
@date2025/3/25 17:27
@desc:
"""
from django.db.models import QuerySet
from function_lib.models.function import FunctionLib
def get_function_lib_operation_object(function_lib_id):
function_lib_model = QuerySet(model=FunctionLib).filter(id=function_lib_id).first()
if function_lib_model is not None:
return {
"name": function_lib_model.name
}
return {}