Skip to content

Commit

Permalink
use Support#blank? method to determine if parsed_response is empty or…
Browse files Browse the repository at this point in the history
… nil
  • Loading branch information
eikes committed Jun 4, 2024
1 parent 078dc48 commit 244f78f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ioki/apis/endpoints/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def call(client, model, args = [], options = {})
params: options[:params]
)

return if parsed_response.empty?
return if Support.blank?(parsed_response)

model_class
.new(parsed_response['data'], response.headers[:etag], show_deprecation_warnings: false)
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/apis/endpoints/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def call(client, args = [], options = {})
params: options[:params]
)

return if parsed_response.empty?
return if Support.blank?(parsed_response)

model_class
.new(parsed_response['data'], nil, show_deprecation_warnings: false)
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/apis/endpoints/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def call(client, model, args = [], options = {})
params: options[:params]
)

return if parsed_response.empty?
return if Support.blank?(parsed_response)

model_class
.new(parsed_response['data'], response.headers[:etag], show_deprecation_warnings: false)
Expand Down

0 comments on commit 244f78f

Please sign in to comment.