Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
Use name input for full_name if blank
Dieser Commit ist enthalten in:
Ursprung
1e4348b67a
Commit
978dc7c235
1 geänderte Dateien mit 12 neuen und 2 gelöschten Zeilen
|
@ -404,9 +404,19 @@ class CustomWizard::Action
|
|||
members_visibility_level
|
||||
grant_trust_level
|
||||
).each do |attr|
|
||||
if action[attr].present?
|
||||
input = action[attr]
|
||||
|
||||
if attr === "name" && input.blank?
|
||||
raise ArgumentError.new
|
||||
end
|
||||
|
||||
if attr === "full_name" && input.blank?
|
||||
input = action["name"]
|
||||
end
|
||||
|
||||
if input.present?
|
||||
value = CustomWizard::Mapper.new(
|
||||
inputs: action[attr],
|
||||
inputs: input,
|
||||
data: data,
|
||||
user: user
|
||||
).perform
|
||||
|
|
Laden …
In neuem Issue referenzieren