Skip to content

Commit f861f81

Browse files
committed
Fixed fail, update libs and ready to release
Signed-off-by: Toomore Chiang <[email protected]>
1 parent 1cf7e67 commit f861f81

File tree

4 files changed

+50
-40
lines changed

4 files changed

+50
-40
lines changed

Dockerfile-app

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ ADD ./view/user.py ./view/user.py
9999
ADD ./view/utils.py ./view/utils.py
100100

101101
ADD ./structs/__init__.py ./structs/__init__.py
102+
ADD ./structs/projects.py ./structs/projects.py
103+
ADD ./structs/teams.py ./structs/teams.py
102104
ADD ./structs/users.py ./structs/users.py
103105

104106
ADD ./api/__init__.py ./api/__init__.py

poetry.lock

+38-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

structs/teams.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
''' Teams Structs '''
22
from datetime import datetime
33

4-
from pydantic import BaseModel, EmailStr, Field
4+
from pydantic import BaseModel, EmailStr, Field, validator
55

66

77
class TagMembers(BaseModel):
@@ -40,3 +40,11 @@ class TeamUsers(BaseModel):
4040
description="list of chiefs' uids")
4141
members: list[str] = Field(
4242
default_factory=list, description="list of members' uids")
43+
44+
@validator('*', pre=True)
45+
def process_none(cls, value: list[str] | None) -> list[str]: # pylint: disable=no-self-argument
46+
''' process none '''
47+
if value is None:
48+
return []
49+
50+
return value

view/project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def project_edit_create_team_api(pid: str) -> Response:
348348
if k in _team:
349349
team[k] = _team[k]
350350

351-
if 'headcount' not in team:
351+
if 'headcount' not in team or team['headcount'] is None:
352352
team['headcount'] = 0
353353
else:
354354
team['headcount'] = max([0, int(team['headcount'])])

0 commit comments

Comments
 (0)