chore: Migrate /superset/user_slices and /superset/fave_slices to API v1 (#22964)

Co-authored-by: hughhhh <hughmil3s@gmail.com>
This commit is contained in:
Diego Medina
2023-04-03 14:29:02 -03:00
committed by GitHub
parent 13ffb4b7c2
commit cdc7af11bf
14 changed files with 208 additions and 43 deletions

View File

@@ -332,6 +332,12 @@ class Slice( # pylint: disable=too-many-public-methods
name = escape(self.chart)
return Markup(f'<a href="{self.url}">{name}</a>')
@property
def created_by_url(self) -> str:
if not self.created_by:
return ""
return f"/superset/profile/{self.created_by.username}"
@property
def changed_by_url(self) -> str:
return f"/superset/profile/{self.changed_by.username}" # type: ignore