{"record":{"id":"8a7320d78f20a114","repo":"theforeman/foreman","slug":"s-is-not-auditable","errorCode":null,"errorMessage":"%s is not auditable","messagePattern":"(.+?) is not auditable","errorType":"exception","errorClass":"Foreman::Exception","httpStatus":null,"severity":"error","filePath":"app/services/foreman/renderer/scope/macros/base.rb","lineNumber":444,"sourceCode":"              array.map! { |str| CGI.escapeHTML(str) }\n              # Replace all \"\\n\" in the string with \"\\n<br>\"\n              array.map! { |str| str.gsub(\"\\n\", \"\\n<br>\") }\n              array.join.html_safe\n            end\n          end\n\n          apipie :method, 'Returns previous revision of a record as tracked in the audit' do\n            desc 'Returns the same object if there is no previous revision'\n            required :record, ApplicationRecord, desc: 'Record to get previous revision for'\n            returns ApplicationRecord\n            raises error: Foreman::Exception, desc: 'when the provided record is not auditable'\n            example 'previous_revision(host_with_new_name).name # => \"previous-name\"'\n          end\n          def previous_revision(record)\n            record.revision(:previous)\n          rescue NoMethodError => e\n            Foreman::Logging.logger('templates').error(e)\n            raise Foreman::Exception.new(_('%s is not auditable') % record.class)\n          end\n\n          apipie :method, 'Returns a short version of Foreman' do\n            desc 'Returns a string representing the short version (X.Y) of Foreman'\n            returns String\n            example 'foreman_short_version # => \"3.4\"'\n          end\n          def foreman_short_version\n            Foreman::Version.new.short\n          end\n\n          apipie :method, 'Returns a short version of Foreman as a product' do\n            desc 'Returns a string representing the short version (X.Y) of Foreman as a product'\n            returns String\n            example 'product_short_version # => \"3.4\"'\n          end\n          def product_short_version\n            Foreman::Version.new.short","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/foreman/renderer/scope/macros/base.rb#L426-L462","documentation":"Error \"%s is not auditable\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/foreman/renderer/scope/macros/base.rb:444 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}