Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Set migration version. Use ancestors instead of module_parents.

Sebastian Palma3136d1404738
diff --git a/api/app/models/concerns/spree/webhooks/has_webhooks.rb b/api/app/models/concerns/spree/webhooks/has_webhooks.rb
index 6ff9a35614..479d3699cd 100644
--- a/api/app/models/concerns/spree/webhooks/has_webhooks.rb
+++ b/api/app/models/concerns/spree/webhooks/has_webhooks.rb
@@ -25,7 +25,7 @@ module Spree
end
def webhooks_descendant?
- self.class.module_parents.include?(Spree::Webhooks)
+ self.class.ancestors.include?(Spree::Webhooks)
end
def payload
diff --git a/api/db/migrate/20210902162826_create_spree_webhooks_tables.rb b/api/db/migrate/20210902162826_create_spree_webhooks_tables.rb
index 80fb1b0a1c..5a0a6bf5d8 100644
--- a/api/db/migrate/20210902162826_create_spree_webhooks_tables.rb
+++ b/api/db/migrate/20210902162826_create_spree_webhooks_tables.rb
@@ -1,4 +1,4 @@
-class CreateSpreeWebhooksTables < ActiveRecord::Migration[6.1]
+class CreateSpreeWebhooksTables < ActiveRecord::Migration[5.2]
def change
create_table :spree_webhooks_endpoints do |t|
t.string :url, null: false