Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Minor tweaks to subscription loading logic
Dieser Commit ist enthalten in:
Ursprung
99f2e8bbd9
Commit
42517c094e
1 geänderte Dateien mit 12 neuen und 13 gelöschten Zeilen
|
@ -109,11 +109,11 @@ class CustomWizard::Subscription
|
||||||
result = SubscriptionClient.find_subscriptions("discourse-custom-wizard")
|
result = SubscriptionClient.find_subscriptions("discourse-custom-wizard")
|
||||||
|
|
||||||
if result&.any?
|
if result&.any?
|
||||||
slugs = result.supplier.product_slugs
|
|
||||||
|
|
||||||
if slugs.present?
|
|
||||||
ids_and_slugs = result.subscriptions.map do |subscription|
|
ids_and_slugs = result.subscriptions.map do |subscription|
|
||||||
{ id: subscription.product_id, slug: slugs[subscription.product_id] }
|
{
|
||||||
|
id: subscription.product_id,
|
||||||
|
slug: result.products[subscription.product_id]
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
id_and_slug = ids_and_slugs.sort do |a, b|
|
id_and_slug = ids_and_slugs.sort do |a, b|
|
||||||
|
@ -125,7 +125,6 @@ class CustomWizard::Subscription
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def includes?(feature, attribute, value = nil)
|
def includes?(feature, attribute, value = nil)
|
||||||
attributes = self.class.attributes[feature]
|
attributes = self.class.attributes[feature]
|
||||||
|
|
Laden …
In neuem Issue referenzieren