Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing a discount from the staff dashboard fails if Activation Date is not set #1629

Open
jkachel opened this issue May 24, 2023 · 1 comment

Comments

@jkachel
Copy link
Contributor

jkachel commented May 24, 2023

Something appears to be trying to format a blank date, and it results in "Invalid Date" being sent as part of the request payload. Because of this, saving fails - "Invalid Date" is, unsurprisingly, an invalid date and it fails the validation in the serializer.

This was tested with Firefox on macOS (113.0.1) but this is unlikely to be browser specific.

Steps to Reproduce

  1. Open the staff dashboard and navigate to the Discounts area.
  2. Edit a discount (ideally one that has an expiration date but not an activation date set).
  3. Attempt to save the discount. Do not change the activation date.

Expected Behavior

The discount code saves successfully.

Actual Behavior

You get a 400 error, and the discount is not saved.

Related Issues

First encountered in https://github.com/mitodl/hq/issues/1498

Screenshot or Screencast

Request

Response

@pdpinch
Copy link
Member

pdpinch commented Nov 21, 2024

I'm not sure why this ancient issue just surfaced, but I think it will be moot as soon as we move to Universal ecommerce (if it isn't moot already)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants