Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 1, 2021
1 parent ead0107 commit e7c521f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/gorm_persistence_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ func (afo *GormAdminFilterObjects) WithTransaction(handler func(afo1 IAdminFilte

func (afo *GormAdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{}) {
modelDescription := ProjectModels.GetModelFromInterface(model)
afo.UadminDatabase.Db.Preload(clause.Associations).Where(fmt.Sprintf(" \"%s\" = ?", modelDescription.Statement.Schema.PrimaryFields[0].Name), ID).First(model)
afo.UadminDatabase.Db.Preload(clause.Associations).Where(fmt.Sprintf(" \"%s\" = ?", modelDescription.Statement.Schema.PrimaryFields[0].DBName), ID).First(model)
afo.SetLastError(afo.UadminDatabase.Db.Error)
}

Expand Down

0 comments on commit e7c521f

Please sign in to comment.