Skip to content

Commit

Permalink
attempt for ByForApproval fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Sep 27, 2024
1 parent 5ed5d5d commit 4040e3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion handler/app/internal/fileslice/fileslice.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func FileInfo(uri string) (string, string, string) {
lead = "These are the recent file artifacts that have been modified or submitted on Defacto2."
case ForApproval:
logo = "new uploads"
h1sub = "edit the new uploads"
h1sub = "edit the new uploads for approval"
lead = "These are the recent file artifacts that have been submitted for approval on Defacto2."
case Deletions:
logo = "deletions"
Expand Down
10 changes: 5 additions & 5 deletions model/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func (f *Artifacts) ByForApproval(ctx context.Context, exec boil.ContextExecutor
}
const clause = "id DESC"
return models.Files(
qm.WithDeleted(),
models.FileWhere.Deletedat.IsNotNull(),
models.FileWhere.Deletedby.IsNull(),
qm.WithDeleted(),
qm.OrderBy(clause),
qm.Offset(calc(offset, limit)),
qm.Limit(limit)).All(ctx, exec)
Expand All @@ -173,13 +173,13 @@ 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(),
models.FileWhere.Deletedby.IsNull(),
qm.WithDeleted(),
qm.Select(postgres.Columns()...),
qm.From(From)).Bind(ctx, exec, f)
}
Expand Down

0 comments on commit 4040e3b

Please sign in to comment.