Skip to content

Commit

Permalink
change add_tag params
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Dec 1, 2023
1 parent 09ede86 commit cbe61a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/inferno/repositories/requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def create(params)
headers = create_headers(request, params)

params[:tags]&.each do |tag|
request.add_tag(name: tag, request_id: request.index)
request.add_tag(tag)
end

build_entity(
Expand Down Expand Up @@ -120,8 +120,8 @@ def before_create
super
end

def add_tag(tag_hash)
tag = Tags::Model.find_or_create(tag_hash.slice(:name))
def add_tag(tag_name)
tag = Tags::Model.find_or_create(name: tag_name)

Inferno::Application['db.connection'][:requests_tags].insert(
tags_id: tag.id,
Expand Down

0 comments on commit cbe61a7

Please sign in to comment.