Skip to content

Conversation

@laritakr
Copy link
Contributor

Handles situation where the csv has a thumbnail_url but no related_url to use as remote files.

Previously threw an error: NoMethodError - undefined method + for nil:NilClass

Screenshot 2024-08-16 at 7 48 15 PM

@laritakr laritakr added the patch-ver for release notes label Aug 17, 2024
ShanaLMoore
ShanaLMoore previously approved these changes Aug 19, 2024

def combined_files_with(remote_files:)
thumbnail_url = self.attributes['thumbnail_url']
return [thumbnail_url] if remote_files.blank?
Copy link
Contributor

@ShanaLMoore ShanaLMoore Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laritakr to clarify, if thumbnail_url is also blank it'll return an empty array and avoid the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty array should avoid the error (the error was trying to merge the thumbnail url into a nil remote_files value.)

But would be a good thing to double-check.

@ShanaLMoore ShanaLMoore self-requested a review August 19, 2024 14:31
@ShanaLMoore ShanaLMoore dismissed their stale review August 19, 2024 14:31

clarifying question

@laritakr laritakr merged commit d24864e into main Aug 19, 2024
@laritakr laritakr deleted the handle-thumbnail-url-only branch August 19, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch-ver for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants