Skip to content

Commit 73cf66b

Browse files
committed
update opp id
1 parent 5483297 commit 73cf66b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

salesforce/management/commands/update_opportunities.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ def process_results(self, results, delete_stale=False):
4444
# don't build records for non-active books
4545
if record['Opportunity__r']['Book__r']['Active__c']:
4646
opportunity, created = AdoptionOpportunityRecord.objects.update_or_create(
47-
opportunity_id=[record['Opportunity__r']['Book__r']['Id']],
47+
opportunity_id=[record['Id']],
4848
account_uuid=uuid.UUID(record['Opportunity__r']['Contact__r']['Accounts_UUID__c']),
4949
book_name=record['Opportunity__r']['Book__r']['Name'],
50-
defaults={'opportunity_id': record['Id'],
51-
'opportunity_stage': record['Opportunity__r']['StageName'],
50+
defaults={'opportunity_stage': record['Opportunity__r']['StageName'],
5251
'adoption_type': record['Adoption_Type__c'],
5352
'base_year': record['Base_Year__c'],
5453
'confirmation_date': record['Confirmation_Date__c'],

0 commit comments

Comments
 (0)