0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-12 21:22:54 +01:00

FIX: Prevent exception for non-subscribers

Dieser Commit ist enthalten in:
Angus McLeod 2024-11-04 13:24:30 +01:00
Ursprung f45a117c64
Commit 8751dc297a
3 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -94,8 +94,11 @@ export default Controller.extend({
}, },
setAfterTimeGroupIds() { setAfterTimeGroupIds() {
if (!this.wizard.after_time_groups) {
return;
}
const groups = this.site.groups.filter((g) => const groups = this.site.groups.filter((g) =>
this.wizard.after_time_groups?.includes(g.name) this.wizard.after_time_groups.includes(g.name)
); );
this.setProperties({ this.setProperties({
afterTimeGroupIds: groups.map((g) => g.id), afterTimeGroupIds: groups.map((g) => g.id),

Datei anzeigen

@ -44,6 +44,7 @@ export default DiscourseRoute.extend({
currentStep: wizard.steps[0], currentStep: wizard.steps[0],
currentAction: wizard.actions[0], currentAction: wizard.actions[0],
creating: model.create, creating: model.create,
afterTimeGroupIds: [],
}; };
controller.setProperties(props); controller.setProperties(props);

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# name: discourse-custom-wizard # name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
# version: 2.9.1 # version: 2.9.2
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
# url: https://github.com/paviliondev/discourse-custom-wizard # url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech # contact_emails: development@pavilion.tech