def promoted?(emendation)
      logs = Decidim::ActionLog.where(decidim_component_id: emendation.component)
                               .where(decidim_user_id: emendation.creator_author)
                               .where(action: "promote")

      logs.select { |log| log.extra["promoted_from"] == emendation.id }.present?
    end
def promoted?(emendation)
      logs = Decidim::ActionLog.where(decidim_component_id: emendation.component)
                               .where(decidim_user_id: emendation.creator_author)
                               .where(action: "promote")

      logs.select { |log| log.extra["promoted_from"] == emendation.id }.present?
    end
Checks if the unique ActionLog created in the promote command exists.