Skip to content

Commit

Permalink
ensure max projects is int
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 15, 2024
1 parent fe2e0c0 commit 19a94cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mpcontribs-api/mpcontribs/api/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

templates = os.path.join(os.path.dirname(flask_mongorest.__file__), "templates")
projects = Blueprint("projects", __name__, template_folder=templates)
MAX_PROJECTS = os.environ.get("MAX_PROJECTS", 3)
MAX_PROJECTS = int(os.environ.get("MAX_PROJECTS", 3))


class ColumnResource(Resource):
Expand Down
2 changes: 1 addition & 1 deletion mpcontribs-api/supervisord/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"db": db,
"s3": s3,
"tm": tm.upper(),
"max_projects": max_projects if max_projects else 3
"max_projects": int(max_projects) if max_projects else 3
}

kwargs = {
Expand Down
2 changes: 1 addition & 1 deletion mpcontribs-api/supervisord/supervisord.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ environment=
MPCONTRIBS_API_HOST="{{ mpcontribs_api_host }}:{{ cfg.api_port }}",
MPCONTRIBS_DB_NAME="mpcontribs-{{ cfg.db }}",
TRADEMARK="{{ cfg.tm }}",
MAX_PROJECTS="{{ cfg.max_projects }}",
MAX_PROJECTS={{ cfg.max_projects }},
S3_DOWNLOADS_BUCKET="mpcontribs-downloads-{{ cfg.s3 }}",
S3_ATTACHMENTS_BUCKET="mpcontribs-attachments-{{ cfg.s3 }}",
S3_IMAGES_BUCKET="mpcontribs-images-{{ cfg.s3 }}",
Expand Down

0 comments on commit 19a94cd

Please sign in to comment.