From 023d0207a8a73b3b4af7877dd1710db7bd001365 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 27 May 2014 16:13:30 -0500 Subject: [PATCH] Fixed bug in deleting campaign --- models/campaign.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/campaign.go b/models/campaign.go index 9624f735..beabfe7d 100644 --- a/models/campaign.go +++ b/models/campaign.go @@ -95,7 +95,7 @@ func UpdateCampaignStatus(c *Campaign, s string) error { //DeleteCampaign deletes the specified campaign func DeleteCampaign(id int64) error { // Delete all the campaign results - err := db.Delete(&Result{CampaignId: id}).Error + err := db.Where("campaign_id=?", id).Delete(&Result{}).Error if err != nil { Logger.Println(err) return err