Skip to content

Commit

Permalink
style(rubocop): Lint/DuplicateBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 12, 2024
1 parent 0e0aca0 commit a1dc0f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions app/models/additional_route_endpoint.rb
Expand Up @@ -37,9 +37,7 @@ def _endpoint
end

def _endpoint=(value)
if value.blank?
self.endpoint = nil
elsif value =~ /\#/
if value && value =~ /\#/
class_name, id = value.split("#", 2)
unless Route::ENDPOINT_TYPES.include?(class_name)
raise Postal::Error, "Invalid endpoint class name '#{class_name}'"
Expand Down
4 changes: 1 addition & 3 deletions lib/postal/message_db/database.rb
Expand Up @@ -306,9 +306,7 @@ def escape(value)
"1"
elsif value == false
"0"
elsif value.nil?
"NULL"
elsif value.to_s.empty?
elsif value.nil? || value.to_s.empty?
"NULL"
else
"'" + mysql.escape(value.to_s) + "'"
Expand Down

0 comments on commit a1dc0f7

Please sign in to comment.