Skip to content

Commit

Permalink
Merge pull request #49 from stuartcampbell/fix-for-cycle-2016-1
Browse files Browse the repository at this point in the history
Make the first and last name optional for a user (to match PASS behaviour)
  • Loading branch information
nmaytan committed Feb 14, 2024
2 parents e110ebb + 575fe94 commit ef2b095
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nsls2api/models/proposals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class SafetyForm(pydantic.BaseModel):


class User(pydantic.BaseModel):
first_name: str
last_name: str
first_name: Optional[str] = None
last_name: Optional[str] = None
email: str
bnl_id: Optional[str]
username: Optional[str]
bnl_id: Optional[str] = None
username: Optional[str] = None
is_pi: bool = False


Expand All @@ -29,7 +29,7 @@ class Proposal(beanie.Document):
pass_type_id: Optional[str]
instruments: Optional[list[str]] = []
cycles: Optional[list[str]] = []
users: list[User] = []
users: Optional[list[User]] = []
safs: Optional[list[SafetyForm]] = []
created_on: datetime.datetime = pydantic.Field(
default_factory=datetime.datetime.now
Expand Down

0 comments on commit ef2b095

Please sign in to comment.