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

generateorders has misleading output #829

Open
kousu opened this issue Mar 5, 2018 · 0 comments
Open

generateorders has misleading output #829

kousu opened this issue Mar 5, 2018 · 0 comments

Comments

@kousu
Copy link

kousu commented Mar 5, 2018

Actual Behaviour

As found in #828 :

$ /usr/bin/docker exec souschef_web_1 python src/manage.py generateorders 2018-02-27 --days 100
 
75 orders created on 2018-02-27: to be delivered on 2018-02-27.
...

but I checked the frontend, and the orders weren't created as far as I can tell: I would expect created orders to be in the Ordered state, but the Ordered state was empty for 2018-02-27, and instead most orders were in Delivered (due to manage.py setordersdelivered).

I'm guessing that whoever wrote generateorders wisely made it idempotent. That's the only way generated --days 100 ahead every night could be safe. I applaud this. But the logging statement is misleading.

Expected Behaviour

manage.py generateorders should accurately describe what it's doing to the database. It's a pretty powerful command and it's scary to run it without being able to see inside it. I want the output to be something more like

2018-02-27T21:00:00: 75 orders on to be delivered on 2018-02-27 (74 existing, 1 created).
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

No branches or pull requests

1 participant