DEV: Use plugin name appropriately in warning (#270)

Use plugin name appropriately in warning
This commit is contained in:
Natalie Tay 2023-12-07 16:09:06 +08:00 committed by GitHub
parent a6341627d0
commit ac7df5e3d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,6 @@ import Query from "discourse/plugins/discourse-data-explorer/discourse/models/qu
const NoQuery = Query.create({ name: "No queries", fake: true, group_ids: [] });
export default class PluginsExplorerController extends Controller {
@service("router") router;
@service dialog;
@service appEvents;
@service router;

View File

@ -1,6 +1,6 @@
import { inject as service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service";
export default class GroupReportsIndexRoute extends DiscourseRoute {
@service router;

View File

@ -1,6 +1,6 @@
import { inject as service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service";
export default class GroupReportsShowRoute extends DiscourseRoute {
@service router;

View File

@ -103,12 +103,12 @@ after_initialize do
query_params = fields.dig("query_params", "value") || {}
unless SiteSetting.data_explorer_enabled
Rails.logger.warn "#{DiscourseDataExplorer.plugin_name} - plugin must be enabled to run automation #{automation.id}"
Rails.logger.warn "#{DiscourseDataExplorer::PLUGIN_NAME} - plugin must be enabled to run automation #{automation.id}"
next
end
unless recipients.present?
Rails.logger.warn "#{DiscourseDataExplorer.plugin_name} - couldn't find any recipients for automation #{automation.id}"
Rails.logger.warn "#{DiscourseDataExplorer::PLUGIN_NAME} - couldn't find any recipients for automation #{automation.id}"
next
end