Skip to content

Get previous template version #5230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Dec 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update coderd/database/databasefake/databasefake.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
  • Loading branch information
BrunoQuaresma and mafredri authored Dec 5, 2022
commit 0f3c2b4343ea7a4b5c9e430b7d32edaaf4209249
2 changes: 1 addition & 1 deletion coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ func (q *fakeQuerier) GetPreviousTemplateVersion(_ context.Context, arg database

previousTemplateVersions := make([]database.TemplateVersion, 0)
for _, templateVersion := range q.templateVersions {
if templateVersion.ID == currentTemplateVersion.ID {
if templateVersion.ID == currentTemplateVersion.ID || templateVersion.OrganizationID != arg.OrganizationID || templateVersion.TemplateID != arg.TemplateID {
continue
}
if templateVersion.CreatedAt.Before(currentTemplateVersion.CreatedAt) {
Expand Down