Merge pull request #1937 from biosistemika/3702-report-error-fix

SCI-3702  Error at generating docx report
This commit is contained in:
Miha Mencin 2019-07-15 16:42:53 +02:00 committed by GitHub
commit 88dcf8edb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,8 @@
module DrawStepChecklist
def draw_step_checklist(subject)
team = @report_team
user = @user
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
@ -22,7 +24,7 @@ module DrawStepChecklist
@docx.ul do
items.each do |item|
li do
text SmartAnnotations::TagToText.new(@user, @report_team, item.text).text
text SmartAnnotations::TagToText.new(user, team, item.text).text
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
end
end