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
Fix fake database
  • Loading branch information
BrunoQuaresma committed Dec 6, 2022
commit 2ada7c81e93c96cb6853ce31ff81ebf74c475f56
2 changes: 1 addition & 1 deletion coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ func (q *fakeQuerier) GetPreviousTemplateVersion(_ context.Context, arg database

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