Skip to content

Commit

Permalink
Filter node versions by version not createdAt.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Jan 7, 2025
1 parent fd103df commit 2c98ce9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/registry/registry_svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,14 @@ func (s *RegistryService) ListNodeVersions(
query := client.NodeVersion.Query().
WithStorageFile().
WithComfyNodes().
Order(ent.Desc(nodeversion.FieldCreateTime))
Order(ent.Desc(nodeversion.FieldVersion))

if filter.NodeId != "" {
log.Ctx(ctx).Info().Msgf("listing node versions: %v", filter.NodeId)
query.Where(nodeversion.NodeIDEQ(filter.NodeId))
}

if filter.Status != nil && len(filter.Status) > 0 {
if len(filter.Status) > 0 {
log.Ctx(ctx).Info().Msgf("listing node versions with status: %v", filter.Status)
query.Where(nodeversion.StatusIn(filter.Status...))
}
Expand Down

0 comments on commit 2c98ce9

Please sign in to comment.