From 405499aa86bacef7a013da462f871842701e185a Mon Sep 17 00:00:00 2001 From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:24:41 +0530 Subject: [PATCH] add visibility filter to PUBLIC or INTERNAL on examples page --- daras_ai_v2/base.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py index 78e97ed76..494282a2d 100644 --- a/daras_ai_v2/base.py +++ b/daras_ai_v2/base.py @@ -2171,10 +2171,14 @@ def _render(pr: PublishedRun): allow_hide=allow_hide, ) - qs = PublishedRun.objects.filter( - workflow=self.workflow, - is_approved_example=True, - ).exclude(published_run_id="") + qs = ( + PublishedRun.objects.filter( + workflow=self.workflow, + is_approved_example=True, + ) + .exclude(published_run_id="") + .exclude(visibility=PublishedRunVisibility.UNLISTED) + ) example_runs, cursor = paginate_queryset( qs=qs,