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

22 lines
470 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 16:56
@desc:
"""
from django.db.models import QuerySet
from application.models import Application
def get_application_operation_object(application_id):
application_model = QuerySet(model=Application).filter(id=application_id).first()
if application_model is not None:
return {
"name": application_model.name
}
return {}