From 13c5da6b74d353da41933d8cd8a81aa1064c0b09 Mon Sep 17 00:00:00 2001 From: tahiru Date: Mon, 11 Dec 2023 10:58:47 +0000 Subject: [PATCH] campaign tech info fix --- src/api/handlers/campaign.py | 4 ++-- src/apps__campaigns/helpers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/handlers/campaign.py b/src/api/handlers/campaign.py index 42bdbe7b8..a4ed1bfe6 100644 --- a/src/api/handlers/campaign.py +++ b/src/api/handlers/campaign.py @@ -779,7 +779,7 @@ def create_campaign_config(self, request): self.validator.expect("campaign_id", str, is_required=True) self.validator.expect("advert", str, is_required=False) self.validator.expect("theme", str, is_required=False) - + args, err = self.validator.verify(args, strict=True) if err: return err @@ -794,7 +794,7 @@ def update_campaign_config(self, request): context: Context = request.context args: dict = context.args - self.validator.expect("campaign_id", str, is_required=True) + self.validator.expect("id", str, is_required=True) self.validator.expect("advert", str, is_required=False) self.validator.expect("theme", str, is_required=False) args, err = self.validator.verify(args) diff --git a/src/apps__campaigns/helpers.py b/src/apps__campaigns/helpers.py index 984b5e7a3..1956cf428 100644 --- a/src/apps__campaigns/helpers.py +++ b/src/apps__campaigns/helpers.py @@ -49,7 +49,7 @@ def get_campaign_technology_details(campaign_technology_id, campaign_home, email comments = Comment.objects.filter(campaign_technology__id=campaign_technology_id, is_deleted=False) return { - **get_technology_details(campaign_tech.campaign.id), + **get_technology_details(campaign_tech.technology.id), "views":views.count(), "has_liked":liked, "likes":likes.count(),