|
@@ -10,8 +10,8 @@ from app.schemas.sapce_weight import SpaceWeightCreate, SpaceWeightUpdate
|
|
from app.utils.date import get_time_str
|
|
from app.utils.date import get_time_str
|
|
|
|
|
|
|
|
|
|
-def get_weight_by_space(db: Session, space_id: str) -> VAVRoomWeight:
|
|
|
|
- return db.query(VAVRoomWeight).filter(VAVRoomWeight.space_id == space_id).first()
|
|
|
|
|
|
+def get_weights_by_space(db: Session, space_id: str) -> List[VAVRoomWeight]:
|
|
|
|
+ return db.query(VAVRoomWeight).filter(VAVRoomWeight.space_id == space_id).all()
|
|
|
|
|
|
|
|
|
|
def get_weights_by_vav(db: Session, vav_id: str) -> List[VAVRoomWeight]:
|
|
def get_weights_by_vav(db: Session, vav_id: str) -> List[VAVRoomWeight]:
|