-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
500 Error on Payment Methods Report #5572
Comments
is this the same thing? #4977 |
@kirstenalarsen Well what I understand is that in @lin-d-hop 's case it's a super user that has the problem and not one enterprise in particular, which makes it difficult to find the order causing this. That's the difference I see between the two. But maybe I've missunderstood. |
Definitely not related to #4977. Payment Totals report is not the Order Cycle Management -> Payment Methods report. |
@lin-d-hop it's not the same report, but I think it is the same cause: some corrupt data. |
Could well be related and due to an order not having a payment associated: The key difference is that the data is loaded before the page renders so the corrupted order makes the page totally unusable for any user associated with the order. |
Hey team, I'm hoping this can get into the next release please? |
It made it to test ready so it should be tested by today or tomorrow |
Description
The Order Cycle Management -> Payments Methods report loads all orders before even loading the filter/search page.
To find Payments Methods it uses a line:
pm = o.payments.first.payment_method
-> payment.first is nilIf ONE order that is available to the user from ANY of their enterprises fails to find a payment method then the whole page crashes - 500Error:
undefined method
payment_method' for nil:NilClass`Bugsnag: https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5ea17c7622a1830018e1f834?filters[event.since][0]=30d&filters[error.status][0]=open
Since the system allows an order without a payment (?) we need this report to run regardless.
Expected Behavior
The report, ya know, works.
Actual Behaviour
SLUG
Steps to Reproduce
I have not been able to track down the enterprise that this order is associated with yet - but ther user [email protected] is associated with it. This user is the one I use for all reports integrations.
Animated Gif/Screenshot
Workaround
Severity
bug-s2: a non-critical feature is broken, no workaround
Your Environment
Possible Fix
From @luisramos0 on Slack:
Should be very easy to address (like this o.payments.first&.payment_method)
The text was updated successfully, but these errors were encountered: