app/models/adhoq/execution.rb in adhoq-0.0.5 vs app/models/adhoq/execution.rb in adhoq-0.0.6

- old
+ new

@@ -7,21 +7,19 @@ delegate :supported_formats, to: Adhoq::Reporter def generate_report! build_report.generate! + update_attributes(status: :success) + rescue + update_attributes(status: :failure) end def name [query.name, created_at.strftime('%Y%m%d-%H%M%S'), report_format].join('.') end def success? - report.try(:available?) - end - - # TODO go decorator or view model or so - def status_label - success? ? :success : :failure + report.try(:available?) || status == "success" end end end