From 28b2bb0d4412ee8a044511700ebd51c398a730a2 Mon Sep 17 00:00:00 2001 From: Code by Ben Date: Sat, 28 Sep 2024 08:43:08 +1000 Subject: [PATCH] temp feedback --- handler/app/context.go | 1 + model/artifacts.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/handler/app/context.go b/handler/app/context.go index 4496f72f..c9ee8bbf 100644 --- a/handler/app/context.go +++ b/handler/app/context.go @@ -166,6 +166,7 @@ func artifacts(c echo.Context, db *sql.DB, uri string, page int) error { return DatabaseErr(c, errs, err) } data[records] = r + fmt.Println("RECORDS OF ARTIFACTS: ", len(r)) d, sum, err := stats(ctx, db, uri) if err != nil { return DatabaseErr(c, errs, err) diff --git a/model/artifacts.go b/model/artifacts.go index 33c391dd..cc460cfd 100644 --- a/model/artifacts.go +++ b/model/artifacts.go @@ -159,6 +159,7 @@ func (f *Artifacts) ByForApproval(ctx context.Context, exec boil.ContextExecutor fmt.Fprint(io.Discard, err) return nil, nil } + fmt.Println("B", f.Bytes, "C", f.Count) const clause = "id DESC" return models.Files( qm.WithDeleted(), @@ -173,9 +174,9 @@ func (f *Artifacts) byForApproval(ctx context.Context, exec boil.ContextExecutor if invalidExec(exec) { return ErrDB } - // if f.Bytes > 0 && f.Count > 0 { - // return nil - // } + if f.Bytes > 0 && f.Count > 0 { + return nil + } return models.NewQuery( qm.WithDeleted(), models.FileWhere.Deletedat.IsNotNull(),