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

Error when creating sales on Dashboard 2.0 #69

Closed
khalibloo opened this issue Jul 11, 2019 · 2 comments · Fixed by #207
Closed

Error when creating sales on Dashboard 2.0 #69

khalibloo opened this issue Jul 11, 2019 · 2 comments · Fixed by #207
Assignees

Comments

@khalibloo
Copy link
Contributor

What I'm trying to achieve

Create sales.

Steps to reproduce the problem

  1. Fill in the sales creation form
  2. Click submit

What I expected to happen

To have my sale created. Instead, I got an error message saying something went wrong. I checked the network response and I found the following error message from GraphQL. Variable "$input" got invalid value {"endDate": "2019-07-25", "name": "Winter Sale", "startDate": "2019-07-18", "type": "FIXED", "value": "15"}. In field "startDate": Expected type "DateTime", found "2019-07-18". In field "endDate": Expected type "DateTime", found "2019-07-25".

System information
Operating system: Windows 10 x64
Browser: Firefox 67

@khalibloo
Copy link
Contributor Author

It appears that the graphql wants the dates in the following format 2019-07-15T00:00:00+00:00. Adding that in my query fixes the bug. This raises something interesting. To programmers, it's normal that when we have a start and end, the start is inclusive and the end is exclusive. Normal people don't work that way, I believe. Are the end dates in saleor inclusive? If the saleor dates use midnight time like above, that would make them exclusive.

@maarcingebala
Copy link
Member

Related PR saleor/saleor#4539

@maarcingebala maarcingebala transferred this issue from saleor/saleor Aug 12, 2019
@dominik-zeglen dominik-zeglen mentioned this issue Oct 11, 2019
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants