mirror of https://github.com/gophish/gophish
commit
baec4ed5ca
|
@ -74,7 +74,7 @@ func (r *Result) GenerateId() {
|
||||||
for {
|
for {
|
||||||
io.ReadFull(rand.Reader, k)
|
io.ReadFull(rand.Reader, k)
|
||||||
r.RId = fmt.Sprintf("%x", k)
|
r.RId = fmt.Sprintf("%x", k)
|
||||||
err := db.Table("results").Where("id=?", r.RId).First(&Result{}).Error
|
err := db.Table("results").Where("r_id=?", r.RId).First(&Result{}).Error
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue