Skip to content

Commit

Permalink
fix: Ensure progress entry is correctly added to database
Browse files Browse the repository at this point in the history
  • Loading branch information
ammopt committed Nov 11, 2024
1 parent f234d4b commit 19ce72a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/web/sys/Community/CampaignMilestoneProgressEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class CampaignMilestoneProgressEntry extends DataObject
public $__table = 'ce_campaign_milestone_progress_entries';
public $id;
public $userId;
public $ce_campaign_id;
public $ce_milestone_id;
public $ce_campaign_milestone_users_progress_id;
public $tableName;
Expand All @@ -29,7 +30,8 @@ class CampaignMilestoneProgressEntry extends DataObject
public function initialize(CampaignMilestone $campaignMilestone, $args = null)
{

$this->ce_milestone_id = $campaignMilestone->ce_milestone_id;
$this->ce_milestone_id = $campaignMilestone->milestoneId;
$this->ce_campaign_id = $campaignMilestone->campaignId;

if (!$args)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function getCommunityEngagementUpdates() {
"CREATE TABLE IF NOT EXISTS ce_campaign_milestone_progress_entries (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
userId INT NOT NULL,
ce_campaign_id INT NOT NULL, #TODO: this may not be needed
ce_campaign_id INT NOT NULL,
ce_milestone_id INT NOT NULL,
ce_campaign_milestone_users_progress_id INT NOT NULL,
tableName VARCHAR(100),
Expand Down

0 comments on commit 19ce72a

Please sign in to comment.