Skip to content
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

fix: 修正使用First的情况下,查询会导致提示报错的问题 #1190

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion dice/model/group_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ func GroupPlayerInfoGet(db *gorm.DB, groupID string, playerID string) *GroupPlay
result := db.Model(&GroupPlayerInfoBase{}).
Where("group_id = ? AND user_id = ?", groupID, playerID).
Select("name, last_command_time, auto_set_name_template, dice_side_num").
First(&ret)
Limit(1).
Find(&ret)
err := result.Error
// 如果查询发生错误,打印错误并返回 nil
if err != nil {
Expand Down
Loading