Skip to content

Commit

Permalink
Merge pull request #47 from stuartcampbell/fix-missing-fields-from-up…
Browse files Browse the repository at this point in the history
…stream

Update Proposal model with default values
  • Loading branch information
nmaytan authored Feb 14, 2024
2 parents a1642c4 + 10d55cd commit ffc1bfb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/nsls2api/models/proposals.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class User(pydantic.BaseModel):
class Proposal(beanie.Document):
proposal_id: str
data_session: str
title: Optional[str]
type: Optional[str]
title: Optional[str] = None
type: Optional[str] = None
pass_type_id: Optional[str]
instruments: Optional[list[str]]
cycles: Optional[list[str]]
users: list[User]
safs: Optional[list[SafetyForm]]
instruments: Optional[list[str]] = []
cycles: Optional[list[str]] = []
users: list[User] = []
safs: Optional[list[SafetyForm]] = []
created_on: datetime.datetime = pydantic.Field(
default_factory=datetime.datetime.now
)
Expand Down

0 comments on commit ffc1bfb

Please sign in to comment.