Fixed bug in deleting campaign

pull/24/head
Jordan 2014-05-27 16:13:30 -05:00
parent d99bf5ec0e
commit 023d0207a8
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ func UpdateCampaignStatus(c *Campaign, s string) error {
//DeleteCampaign deletes the specified campaign //DeleteCampaign deletes the specified campaign
func DeleteCampaign(id int64) error { func DeleteCampaign(id int64) error {
// Delete all the campaign results // Delete all the campaign results
err := db.Delete(&Result{CampaignId: id}).Error err := db.Where("campaign_id=?", id).Delete(&Result{}).Error
if err != nil { if err != nil {
Logger.Println(err) Logger.Println(err)
return err return err