Skip to content

Commit 00f3286

Browse files
committed
fix: error in sql join
1 parent 53c76bf commit 00f3286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/workshop.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def host
3434
sql = <<~SQL
3535
SELECT sponsors.*
3636
FROM sponsors
37-
LEFT JOIN workshop_sponsors ON workshop_sponsors.workshop_id = sponsors.id
37+
LEFT JOIN workshop_sponsors ON workshop_sponsors.sponsor_id = sponsors.id
3838
WHERE workshop_sponsors.workshop_id = ?
3939
AND workshop_sponsors.host = TRUE
4040
AND sponsors.id = workshop_sponsors.sponsor_id

0 commit comments

Comments
 (0)