Fix/24655 (#26527)
Co-authored-by: charles liu <dearcharles.liu@gmail.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
@@ -75,6 +75,7 @@ dataset_detail_fields = {
|
||||
"document_count": fields.Integer,
|
||||
"word_count": fields.Integer,
|
||||
"created_by": fields.String,
|
||||
"author_name": fields.String,
|
||||
"created_at": TimestampField,
|
||||
"updated_by": fields.String,
|
||||
"updated_at": TimestampField,
|
||||
|
||||
@@ -121,6 +121,13 @@ class Dataset(Base):
|
||||
def created_by_account(self):
|
||||
return db.session.get(Account, self.created_by)
|
||||
|
||||
@property
|
||||
def author_name(self) -> str | None:
|
||||
account = db.session.get(Account, self.created_by)
|
||||
if account:
|
||||
return account.name
|
||||
return None
|
||||
|
||||
@property
|
||||
def latest_process_rule(self):
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user