Skip to content

Fix error in CloudConnector::Access when we have date that is nil

Gosia Ksionek requested to merge mk-fix-error into master

What does this MR do and why?

There is one edge case for service_start_date_for method in CloudConnector::Access class.

When we have available service data but in this data date is nil, we no longer have 500 error.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

In rails console, create new record:

ca = CloudConnector::Access.new
ca.data = { available_services: [{ name: "duo_chat", serviceStartTime: nil }] }
ca.save!

Visit any page and check if this is returning 500. It should not.

Merge request reports