mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +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]
|
if export_projects_params[:project_ids]
|
||||||
# Check if user has enough requests for the day
|
# Check if user has enough requests for the day
|
||||||
limit = (ENV['EXPORT_ALL_LIMIT_24_HOURS'] || 3).to_i
|
limit = (ENV['EXPORT_ALL_LIMIT_24_HOURS'] || 3).to_i
|
||||||
if limit.zero? \
|
if !limit.zero? \
|
||||||
|| current_user.export_vars['num_of_export_all_last_24_hours'] >= limit
|
&& current_user.export_vars['num_of_export_all_last_24_hours'] >= limit
|
||||||
render json: {
|
render json: {
|
||||||
html: render_to_string(
|
html: render_to_string(
|
||||||
partial: 'projects/export/error.html.erb',
|
partial: 'projects/export/error.html.erb',
|
||||||
|
|
Loading…
Reference in a new issue