uploads: add space after artist tag (fix #4392).

This commit is contained in:
evazion
2022-02-03 17:09:26 -06:00
parent 280885e8e8
commit 7e146611d1

View File

@@ -48,6 +48,7 @@ class UploadsController < ApplicationController
@upload = authorize Upload.find(params[:id])
@post = Post.new(uploader: @upload.uploader, uploader_ip_addr: @upload.uploader_ip_addr, source: @upload.source, rating: nil, **permitted_attributes(Post))
@post.tag_string = "#{@post.tag_string} #{@upload.source_strategy&.artists.to_a.map(&:tag).map(&:name).join(" ")}".strip
@post.tag_string += " " if @post.tag_string.present?
if request.format.html? && @upload.is_completed? && @upload.media_assets.first&.post.present?
flash[:notice] = "Duplicate of post ##{@upload.media_assets.first.post.id}"