From 659151cb15c88d5eeaed7cb380c1ced025bbd962 Mon Sep 17 00:00:00 2001 From: AiAe Date: Thu, 3 Sep 2026 21:24:40 +0300 Subject: [PATCH] Dont return error if previous record is not found --- db/username_changes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/username_changes.go b/db/username_changes.go index 7234ee8..c157533 100644 --- a/db/username_changes.go +++ b/db/username_changes.go @@ -37,7 +37,7 @@ func CanUserChangeUsername(userId int) (bool, time.Time, error) { if result.Error != nil { // User has never changed their name previously. if result.Error == gorm.ErrRecordNotFound { - return true, time.Time{}, result.Error + return true, time.Time{}, nil } return false, time.Time{}, result.Error