Refactor set_tell_positions logic with updated rules.
Revised the set_tell_positions endpoint to handle updated business rules for puck positioning. Improved event handling to ensure proper nullification, updates, and removal of tell_positions based on the provided payload. Enhanced query performance and normalized puck name processing for consistency.
This commit is contained in:
@ -478,7 +478,7 @@ class Puck(BaseModel):
|
||||
puck_location_in_dewar: int
|
||||
dewar_id: int
|
||||
events: List[PuckEvent] = []
|
||||
samples: List[Sample] = [] # List of samples within this puck
|
||||
samples: List[Sample] = []
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
@ -645,6 +645,8 @@ class PuckWithTellPosition(BaseModel):
|
||||
puck_type: str
|
||||
puck_location_in_dewar: Optional[str]
|
||||
dewar_id: int
|
||||
dewar_name: str
|
||||
user: str = "e16371"
|
||||
samples: Optional[List[Sample]] = None
|
||||
tell_position: Optional[str]
|
||||
|
||||
|
Reference in New Issue
Block a user