diff --git a/model/torrent.go b/model/torrent.go index c2817fe1..74fd488e 100644 --- a/model/torrent.go +++ b/model/torrent.go @@ -50,8 +50,8 @@ type TorrentReport struct { Description string `gorm:"column:type"` TorrentID uint UserID uint - Torrent Torrent `gorm:"ForeignKey:TorrentID;AssociationForeignKey:ID"` - User User `gorm:"ForeignKey:UserID;AssociationForeignKey:ID"` + Torrent Torrent `gorm:"AssociationForeignKey:TorrentID;ForeignKey:ID"` + User User `gorm:"AssociationForeignKey:UserID;ForeignKey:ID"` } /* We need a JSON object instead of a Gorm structure because magnet URLs are diff --git a/templates/torrent_report.html b/templates/torrent_report.html index 488e6cad..ff93de86 100755 --- a/templates/torrent_report.html +++ b/templates/torrent_report.html @@ -1,6 +1,8 @@ +
{{ .Torrent.Name }} | {{.User}} | {{.Description}} | Delete |