From 351cd801ebf0da665c521448c978da100b4aaf03 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期四, 05 十二月 2024 15:21:08 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/rag-gateway
---
app/models/organization_model.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/app/models/organization_model.py b/app/models/organization_model.py
index f0c2f55..950ba32 100644
--- a/app/models/organization_model.py
+++ b/app/models/organization_model.py
@@ -92,6 +92,13 @@
'children': [org.to_tree_select_json() for org in self.children]
}
+ def to_parent_select_json(self):
+ return {
+ 'id': self.id,
+ 'label': self.name,
+ 'parent': [org.to_parent_select_json() for org in self.parent]
+ }
+
def get_pid(self):
if self.parent:
return self.parent.id
--
Gitblit v1.8.0