Skip to content

fix: CP-1086 Specify latest timestamp (vs nil) when retrieving latest ingredient revision#3722

Merged
samueld-activator merged 2 commits intomasterfrom
samueld/CP-1086
Sep 4, 2025
Merged

fix: CP-1086 Specify latest timestamp (vs nil) when retrieving latest ingredient revision#3722
samueld-activator merged 2 commits intomasterfrom
samueld/CP-1086

Conversation

@samueld-activator
Copy link
Contributor

@samueld-activator samueld-activator commented Aug 29, 2025

BugCP-1086 Error when retrieving some ingredients from project failures

Comment on lines +111 to +116
fixed := make(map[strfmt.UUID]bool)
for _, artifact := range failedArtifacts {
latest, err := model.FetchLatestRevisionTimeStamp(auth)
if err != nil {
return nil, fmt.Errorf("Failed to fetch latest timestamp: %w", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fixed := make(map[strfmt.UUID]bool)
for _, artifact := range failedArtifacts {
latest, err := model.FetchLatestRevisionTimeStamp(auth)
if err != nil {
return nil, fmt.Errorf("Failed to fetch latest timestamp: %w", err)
}
fixed := make(map[strfmt.UUID]bool)
latest, err := model.FetchLatestRevisionTimeStamp(auth)
if err != nil {
return nil, fmt.Errorf("Failed to fetch latest timestamp: %w", err)
}
for _, artifact := range failedArtifacts {

Avoid doing API calls within a for loop if not needed.

@samueld-activator samueld-activator merged commit f25d8e3 into master Sep 4, 2025
3 of 8 checks passed
@samueld-activator samueld-activator deleted the samueld/CP-1086 branch September 4, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants