Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 02:50:28 +01:00
Ensure content exists
Dieser Commit ist enthalten in:
Ursprung
20ca39bf2a
Commit
bffdc1f363
1 geänderte Dateien mit 12 neuen und 10 gelöschten Zeilen
|
@ -257,16 +257,18 @@ class CustomWizard::Builder
|
||||||
}
|
}
|
||||||
).perform
|
).perform
|
||||||
|
|
||||||
if content && content[:type] == 'association'
|
if content.present?
|
||||||
content[:result] = content[:result].map do |item|
|
if content[:type] == 'association'
|
||||||
{
|
content[:result] = content[:result].map do |item|
|
||||||
id: item[:key],
|
{
|
||||||
name: item[:value]
|
id: item[:key],
|
||||||
}
|
name: item[:value]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
params[:content] = content[:result]
|
params[:content] = content[:result]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
field = step.add_field(params)
|
field = step.add_field(params)
|
||||||
|
|
Laden …
In neuem Issue referenzieren