fix error because course not have end time

dev_trainings
p31729568 6 years ago
parent 32227c1f19
commit 5582c4a863

@ -28,7 +28,7 @@
<%= link_to '立即发布', publish_notice_exercise_path(activity), :remote => true %>
</li>
<% end %>
<% if (activity.exercise_status == 2 && activity.end_time > Time.now) || activity.exercise_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").count > 0 %>
<% if (activity.exercise_status == 2 && (activity.end_time.blank? || activity.end_time > Time.now)) || activity.exercise_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").count > 0 %>
<li>
<%= link_to '立即截止', end_notice_exercise_path(activity), :remote => true %>
</li>

Loading…
Cancel
Save