added frontend unit addition/editing
This commit is contained in:
@@ -24,8 +24,10 @@ def get_or_create_roster_unit(db: Session, unit_id: str):
|
||||
def add_roster_unit(
|
||||
id: str = Form(...),
|
||||
unit_type: str = Form("series3"),
|
||||
deployed: bool = Form(True),
|
||||
deployed: bool = Form(False),
|
||||
note: str = Form(""),
|
||||
project_id: str = Form(None),
|
||||
location: str = Form(None),
|
||||
db: Session = Depends(get_db)
|
||||
):
|
||||
if db.query(RosterUnit).filter(RosterUnit.id == id).first():
|
||||
@@ -36,6 +38,8 @@ def add_roster_unit(
|
||||
unit_type=unit_type,
|
||||
deployed=deployed,
|
||||
note=note,
|
||||
project_id=project_id,
|
||||
location=location,
|
||||
last_updated=datetime.utcnow(),
|
||||
)
|
||||
db.add(unit)
|
||||
|
||||
Reference in New Issue
Block a user