mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix no step bug
This commit is contained in:
parent
6d7b55301f
commit
2639810e1a
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="open-mobile-app-buttons">
|
||||
<a type="button"
|
||||
class="btn btn-dark-background btn-large"
|
||||
href="<%= pwa_mobile_app_url(@current_team.id, @project.id, @experiment.id, @my_module.id, @protocol.id, @protocol.first_step.id, request.host) %>">
|
||||
href="<%= pwa_mobile_app_url(@current_team.id, @project.id, @experiment.id, @my_module.id, @protocol.id, @protocol.first_step_id, request.host) %>">
|
||||
<i class="fas fa-mobile-alt"></i>
|
||||
<%= t('my_modules.open_mobile_app.open_mobile_app') %>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue