diff --git a/app/models/protocol.rb b/app/models/protocol.rb index 5bb38bb76..dd0237e9f 100644 --- a/app/models/protocol.rb +++ b/app/models/protocol.rb @@ -364,8 +364,8 @@ class Protocol < ApplicationRecord steps.where(completed: true) end - def first_step - steps.find_by(position: 0) + def first_step_id + steps.find_by(position: 0)&.id end def space_taken diff --git a/app/views/my_modules/_open_mobile_app.html.erb b/app/views/my_modules/_open_mobile_app.html.erb index 6524984f0..823cb1f16 100644 --- a/app/views/my_modules/_open_mobile_app.html.erb +++ b/app/views/my_modules/_open_mobile_app.html.erb @@ -6,7 +6,7 @@
+ href="<%= pwa_mobile_app_url(@current_team.id, @project.id, @experiment.id, @my_module.id, @protocol.id, @protocol.first_step_id, request.host) %>"> <%= t('my_modules.open_mobile_app.open_mobile_app') %>