Skip to content

Commit

Permalink
fix select all ids
Browse files Browse the repository at this point in the history
  • Loading branch information
xjlgod committed Mar 22, 2022
1 parent 949a0be commit d5a3549
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/pkg/webserver/service/importer/taskdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ func (t *TaskDb) LastId() (int, error) {
return id, nil
}

func (t *TaskDb) SelectAllIds(nebulaAddress, username string) ([]int, error) {
func (t *TaskDb) SelectAllIds(nebulaAddress, user string) ([]int, error) {
var taskInfos []TaskInfo
ids := make([]int, 0)
if err := t.Select("id").Where("nebula_address = ? And username = ?", nebulaAddress, username).Find(&taskInfos).Error; err != nil {
if err := t.Select("id").Where("nebula_address = ? And user = ?", nebulaAddress, user).Find(&taskInfos).Error; err != nil {
return nil, err
}
for _, taskInfo := range taskInfos {
Expand Down

0 comments on commit d5a3549

Please sign in to comment.