superset-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] mistercrunch commented on a change in pull request #3518: Full Annotation Framework
Date Thu, 01 Jan 1970 00:00:00 GMT
mistercrunch commented on a change in pull request #3518: Full Annotation Framework
URL: https://github.com/apache/incubator-superset/pull/3518#discussion_r157354560
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1644,9 +1701,51 @@ def created_dashboards(self, user_id):
 
     @api
     @has_access_api
+    @expose('/user_slices', methods=['GET'])
+    @expose('/user_slices/<user_id>/', methods=['GET'])
+    def user_slices(self, user_id=None):
+        """List of slices a user created, or faved"""
+        if not user_id:
+            user_id = g.user.id
+        Slice = models.Slice  # noqa
+        FavStar = models.FavStar # noqa
+        qry = (
+            db.session.query(Slice,
+                             FavStar.dttm).join(
+                models.FavStar,
+                sqla.and_(
+                    models.FavStar.user_id == int(user_id),
 
 Review comment:
   I'm ok with starring, though we should honor the `owners` field over the `created_by`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message