Skip to content

Release 1.146.3#3489

Merged
odlbot merged 4 commits intoreleasefrom
release-candidate
Apr 15, 2026
Merged

Release 1.146.3#3489
odlbot merged 4 commits intoreleasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented Apr 14, 2026

James Kachel

cp-at-mit

@github-actions
Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
7 changes: 0 error, 0 warning, 7 info
info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/records/program/{id}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API POST /api/records/program/{id}/revoke/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[new-optional-request-property] at head/openapi/specs/v0.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: multipart/form-data)

info	[new-optional-request-property] at head/openapi/specs/v0.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/json)

info	[new-optional-request-property] at head/openapi/specs/v0.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/x-www-form-urlencoded)

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API POST /api/records/program/{id}/share/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/records/shared/{uuid}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status



## Changes for v1.yaml:
7 changes: 0 error, 0 warning, 7 info
info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/records/program/{id}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API POST /api/records/program/{id}/revoke/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[new-optional-request-property] at head/openapi/specs/v1.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: multipart/form-data)

info	[new-optional-request-property] at head/openapi/specs/v1.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/json)

info	[new-optional-request-property] at head/openapi/specs/v1.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/x-www-form-urlencoded)

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API POST /api/records/program/{id}/share/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/records/shared/{uuid}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status



## Changes for v2.yaml:
7 changes: 0 error, 0 warning, 7 info
info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/records/program/{id}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API POST /api/records/program/{id}/revoke/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[new-optional-request-property] at head/openapi/specs/v2.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/json)

info	[new-optional-request-property] at head/openapi/specs/v2.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: application/x-www-form-urlencoded)

info	[new-optional-request-property] at head/openapi/specs/v2.yaml	
	in API POST /api/records/program/{id}/share/
		added the new optional request property `is_active` (media type: multipart/form-data)

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API POST /api/records/program/{id}/share/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/records/shared/{uuid}/
		added the optional property `partner_schools/items/is_active` to the response with the `200` status



Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Comment thread hubspot_sync/api.py
Comment on lines +1857 to +1867
total_price_paid=0,
)
line = Line.objects.create(
order=order,
purchased_object_id=product.object_id,
purchased_content_type_id=product.content_type_id,
product_version=product_version,
quantity=1,
)
order.total_price_paid = line.discounted_price
order.save(update_fields=["total_price_paid"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The HubSpot cart tracking function creates permanent Order records that interfere with the actual ecommerce checkout flow, causing potential state corruption.
Severity: HIGH

Suggested Fix

Do not create persistent Order records for tracking purposes. If database records are necessary, ensure they are created and rolled back within the same transaction as the HubSpot API call. Alternatively, use a non-persistent model or a different tracking mechanism that does not interfere with the core ecommerce models.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: hubspot_sync/api.py#L1853-L1867

Potential issue: The function `track_cart_add_with_hubspot` creates and commits a new
`Order` with `state=PENDING` to the database before making an external API call to
HubSpot. These tracking orders are not intended for checkout but persist in the
database. When a user proceeds to the actual checkout, the
`PendingOrder._get_or_create()` method finds and reuses these tracking orders because
they match the query criteria. This leads to state corruption, as the reused order has
incorrect data (e.g., `total_price_paid=0`) and can cause issues with discount
application and order processing.

Did we get this right? 👍 / 👎 to inform future reviews.

@odlbot odlbot merged commit d8fcecd into release Apr 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants