Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
fix climsoft file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
faysal-ishtiaq committed Mar 3, 2022
1 parent 0b3e818 commit c11a8a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__pycache__/
*.py[cod]
*$py.class

climsoft_uploads/
# C extensions
*.so

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ django-colorfield
djantic
email-validator
Faker
Flask
fastapi
FastAPI-SQLAlchemy
Flask
Flask-MySQLdb
Flask-RESTful
mch-api @ git+https://github.com/opencdms/mch-api.git@main
Expand Down
5 changes: 4 additions & 1 deletion src/opencdms_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from sqlalchemy import create_engine
from starlette.middleware.wsgi import WSGIMiddleware
from climsoft_api.main import get_app as get_climsoft_app
from climsoft_api.config import settings as climsoft_settings
from tempestas_api.wsgi import application as surface_application
from mch_api.api_mch import app as mch_api_application
from fastapi import FastAPI, Request
Expand Down Expand Up @@ -90,7 +91,9 @@ def create_default_user():
ClimsoftSessionLocal = sessionmaker(climsoft_engine)
session = ClimsoftSessionLocal()
try:
clim_user_role = session.query(climsoft_models.ClimsoftUser).filter_by(
clim_user_role = session.query(
climsoft_models.ClimsoftUser
).filter_by(
userName=settings.DEFAULT_USERNAME
).one_or_none()

Expand Down

0 comments on commit c11a8a5

Please sign in to comment.