From b6ebaeaf1bf2b60ae75e90c80590a0c792dd2287 Mon Sep 17 00:00:00 2001 From: Matthew Nielsen Date: Tue, 17 Sep 2024 17:08:55 -0600 Subject: [PATCH] prefer #fetch so we know if we try to query on a nonexistant key --- lib/linear/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linear/models/project.rb b/lib/linear/models/project.rb index 267bc25..e5fafda 100644 --- a/lib/linear/models/project.rb +++ b/lib/linear/models/project.rb @@ -39,7 +39,7 @@ def match_score?(string) # Does :string _exactly_ match any of the attribute values in *attrs? def matches_attributes?(string, *attrs) - Array(attrs).any? { |attr| string.casecmp?(data[attr.to_sym]) } + Array(attrs).any? { |attr| string.casecmp?(data.fetch(attr.to_sym)) } end def to_s