Skip to content

Commit 161b082

Browse files
authored
attachment_mapper: Skip for unknown container_type (#149)
`Attachment` may be used by plugins. At that time, an unknown value is set to `container_type`. In this case, skip it because the upsert will fail with an error.
1 parent 772a2db commit 161b082

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/full_text_search/attachment_mapper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def with_project(redmine_class)
5454
def upsert_fts_target(options={})
5555
# container is not specified when initial upload
5656
return if @record.container_type.nil?
57+
return unless Type.available?(@record.container_type)
5758

5859
fts_target = find_fts_target
5960
fts_target.source_id = @record.id

0 commit comments

Comments
 (0)