Skip to content

Commit

Permalink
fix: Removing version checking from creation also
Browse files Browse the repository at this point in the history
  • Loading branch information
langecode committed Jan 26, 2024
1 parent 9ba6004 commit f5c2c35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/store/datastore/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ func (s storage) AgentFindByToken(token string) (*model.Agent, error) {

func (s storage) AgentCreate(agent *model.Agent) error {
// only Insert set auto created ID back to object
_, err := s.engine.Insert(agent)
sess := s.engine.NewSession()
defer sess.Close()
_, err := sess.NoVersionCheck().Insert(agent)
return err
}

Expand Down

0 comments on commit f5c2c35

Please sign in to comment.