営業日の締め切り前にトップページにアクセスすると必ず非成立メッセージが出るのを直した#154
Merged
yucao24hours merged 6 commits intomasterfrom Jun 6, 2017
Merged
Conversation
- 現実に即したデータにした(order が複数ある) - context を使ってわかりやすくした - 「注文」と「予約」の意味を逆で使っているところをなおした
Collaborator
Author
|
今のアプリのままだといきなり「成立しませんでした」と出てしまうので、おしらせさんの 🆒 施策(メニューのおしらせ)の効果にも影響してしまいそうなのを心配しており、できれば早めに対応したいなという思いでおります。忙しいところすみませんが確認よろしくお願いします! 🙏 |
Member
Collaborator
Author
|
LGTM もらったのでマージしますね。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
やったこと
締め切り前にトップページにアクセスすると、(成立数に達していようがいまいが)必ず「本日は予約数不足のため発注されませんでした」のメッセージが出るようになってしまっていたのを直しました。
そもそも締め切り前に成立・非成立に関するメッセージが出るのは期待どおりでないので、締め切り前にはそういったメッセージが出ないようにしました。
トップページで
elseで条件分岐していたところは、「本日が営業日であり、かつ予約は締め切られているが、成立数には達していない」
という場合のみに入ってくることを期待していましたが、実際には
「本日が営業日であり、かつ予約は締め切られていない(成立・非成立は関係ない)」
という場合にも入ってきてしまいます。
そのため、今回発現したように、営業日かつ締め切り前にアクセスすると期待どおりでないメッセージが出てしまうようになっていました。
対応 issue
#153