Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
Handle submissions made by deleted users
Dieser Commit ist enthalten in:
Ursprung
dcee0b3774
Commit
af613c11d6
2 geänderte Dateien mit 12 neuen und 1 gelöschten Zeilen
|
@ -1,4 +1,9 @@
|
||||||
en:
|
en:
|
||||||
|
admin:
|
||||||
|
wizard:
|
||||||
|
submissions:
|
||||||
|
no_user: "deleted (id: %{id})"
|
||||||
|
|
||||||
wizard:
|
wizard:
|
||||||
custom_title: "Wizard"
|
custom_title: "Wizard"
|
||||||
field:
|
field:
|
||||||
|
|
|
@ -148,7 +148,13 @@ class CustomWizard::AdminController < ::ApplicationController
|
||||||
|
|
||||||
all_submissions = [*rows].map do |r|
|
all_submissions = [*rows].map do |r|
|
||||||
submissions = ::JSON.parse(r.value)
|
submissions = ::JSON.parse(r.value)
|
||||||
username = User.find(r.key).username
|
|
||||||
|
if user = User.find_by(id: r.key)
|
||||||
|
username = user.username
|
||||||
|
else
|
||||||
|
username = I18n.t('admin.wizard.submissions.no_user', id: r.key)
|
||||||
|
end
|
||||||
|
|
||||||
submissions.map { |s| { username: username }.merge!(s.except("redirect_to")) }
|
submissions.map { |s| { username: username }.merge!(s.except("redirect_to")) }
|
||||||
end.flatten
|
end.flatten
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren