mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Merge pull request #1351 from jbargu/jg_add_zero_limit_to_export
Fix zero limit config on export all
This commit is contained in:
commit
0977f5251d
1 changed files with 2 additions and 2 deletions
|
@ -229,8 +229,8 @@ class TeamsController < ApplicationController
|
|||
if export_projects_params[:project_ids]
|
||||
# Check if user has enough requests for the day
|
||||
limit = (ENV['EXPORT_ALL_LIMIT_24_HOURS'] || 3).to_i
|
||||
if limit.zero? \
|
||||
|| current_user.export_vars['num_of_export_all_last_24_hours'] >= limit
|
||||
if !limit.zero? \
|
||||
&& current_user.export_vars['num_of_export_all_last_24_hours'] >= limit
|
||||
render json: {
|
||||
html: render_to_string(
|
||||
partial: 'projects/export/error.html.erb',
|
||||
|
|
Loading…
Reference in a new issue