Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
leave send_message if there are any empty data fields
Dieser Commit ist enthalten in:
Ursprung
f5fc69a908
Commit
979e896d6b
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
|
@ -423,6 +423,16 @@ class CustomWizard::Builder
|
||||||
|
|
||||||
def send_message(user, action, data)
|
def send_message(user, action, data)
|
||||||
|
|
||||||
|
empty_data = false
|
||||||
|
|
||||||
|
data.each do |k, v|
|
||||||
|
if v.empty?
|
||||||
|
empty_data = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# leave if there are any empty fields
|
||||||
|
return if empty_data
|
||||||
|
|
||||||
unless action['custom_title_enabled']
|
unless action['custom_title_enabled']
|
||||||
title = data[action['title']]
|
title = data[action['title']]
|
||||||
else
|
else
|
||||||
|
|
Laden …
In neuem Issue referenzieren