Skip to content

Commit

Permalink
Merge pull request #726 from EvanBldy/master
Browse files Browse the repository at this point in the history
various improvements
  • Loading branch information
EvanBldy authored Oct 17, 2023
2 parents 414c17c + 17d6315 commit e14146d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =
flask-migrate==4.0.5
flask-socketio==5.3.6
flask==3.0.0
gazu==0.9.13
gazu==0.9.14
gevent-websocket==0.10.1
gevent==23.9.1
gunicorn==21.2.0
Expand All @@ -56,23 +56,23 @@ install_requires =
matterhook==0.2
meilisearch==0.28.3
OpenTimelineIO==0.15.0
orjson==3.9.8
pillow==10.0.1
orjson==3.9.9
pillow==10.1.0
prometheus-flask-exporter==0.22.4
psutil==5.9.5
psutil==5.9.6
psycopg[binary]==3.1.12
pygelf==0.4.2
pyotp==2.9.0
python-nomad==2.0.0
python-slugify==8.0.1
python-socketio==5.9.0
python-socketio==5.10.0
pytz==2023.3.post1
redis==5.0.1
requests==2.31.0
rq==1.15.1
slackclient==2.9.4
sqlalchemy_utils==0.41.1
sqlalchemy==2.0.21
sqlalchemy==2.0.22
ua-parser==0.18.0
werkzeug==3.0.0

Expand All @@ -99,7 +99,7 @@ test =

lint =
black==23.9.1
pre-commit==3.4.0
pre-commit==3.5.0

[options.entry_points]
console_scripts =
Expand Down
4 changes: 4 additions & 0 deletions zou/app/blueprints/crud/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def check_creation_integrity(self, data):
Check if the data descriptor has a valid production_style.
"""
if "production_style" in data:
if data["production_style"] is None:
data["production_style"] = "2d3d"
types = [type_name for type_name, _ in PROJECT_STYLES]
if data["production_style"] not in types:
raise ArgumentsException("Invalid production_style")
Expand Down Expand Up @@ -158,6 +160,8 @@ def update_data(self, data, instance_id):
"""

if "production_style" in data:
if data["production_style"] is None:
data["production_style"] = "2d3d"
types = [type_name for type_name, _ in PROJECT_STYLES]
if data["production_style"] not in types:
raise ArgumentsException("Invalid production_style")
Expand Down
2 changes: 1 addition & 1 deletion zou/app/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Project(db.Model, BaseMixin, SerializerMixin):
ratio = db.Column(db.String(10))
resolution = db.Column(db.String(12))
production_type = db.Column(db.String(20), default="short")
production_style = db.Column(ChoiceType(PROJECT_STYLES))
production_style = db.Column(ChoiceType(PROJECT_STYLES), default="2d3d")
start_date = db.Column(db.Date())
end_date = db.Column(db.Date())
man_days = db.Column(db.Integer)
Expand Down

0 comments on commit e14146d

Please sign in to comment.