Skip to content

Commit 25af3a6

Browse files
authored
Merge pull request #184 from Quaver/username-change-fix
Dont return error if previous record is not found
2 parents 7933cf2 + 659151c commit 25af3a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

db/username_changes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func CanUserChangeUsername(userId int) (bool, time.Time, error) {
3737
if result.Error != nil {
3838
// User has never changed their name previously.
3939
if result.Error == gorm.ErrRecordNotFound {
40-
return true, time.Time{}, result.Error
40+
return true, time.Time{}, nil
4141
}
4242

4343
return false, time.Time{}, result.Error

0 commit comments

Comments
 (0)