mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
use User database model to append association to scenario-user table
This commit is contained in:
parent
43a5a5dcd3
commit
3b213dbe32
1 changed files with 1 additions and 1 deletions
|
@ -264,7 +264,7 @@ func authenticateExternal(c *gin.Context) (User, error) {
|
|||
continue
|
||||
}
|
||||
|
||||
err = db.Model(&so).Association("Users").Append(&myUser).Error
|
||||
err = db.Model(&so).Association("Users").Append(&(myUser.User)).Error
|
||||
if err != nil {
|
||||
log.Printf("Failed to add user %s (id=%d) to scenario %s (id=%d): %s\n", myUser.Username, myUser.ID, so.Name, so.ID, err)
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue