Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
Value population bugfix
Dieser Commit ist enthalten in:
Ursprung
37cd08a3de
Commit
bd88f6ace6
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -56,7 +56,7 @@ class CustomWizard::Builder
|
||||||
params[:description] = f['description'] if f['description']
|
params[:description] = f['description'] if f['description']
|
||||||
params[:key] = f['key'] if f['key']
|
params[:key] = f['key'] if f['key']
|
||||||
|
|
||||||
if @submissions.last
|
if @submissions.last && @wizard.unfinished?
|
||||||
submission = @submissions.last
|
submission = @submissions.last
|
||||||
params[:value] = submission[f['id']] if submission[f['id']]
|
params[:value] = submission[f['id']] if submission[f['id']]
|
||||||
end
|
end
|
||||||
|
|
|
@ -76,7 +76,7 @@ class CustomWizard::Wizard
|
||||||
acting_user_id: @user.id,
|
acting_user_id: @user.id,
|
||||||
action: ::UserHistory.actions[:custom_wizard_step],
|
action: ::UserHistory.actions[:custom_wizard_step],
|
||||||
context: @id,
|
context: @id,
|
||||||
).distinct.order(:updated_at).first
|
).distinct.order('updated_at DESC').first
|
||||||
|
|
||||||
if most_recent
|
if most_recent
|
||||||
last_finished_step = most_recent.subject
|
last_finished_step = most_recent.subject
|
||||||
|
|
Laden …
In neuem Issue referenzieren