You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove all rows in the staff_tenant_link table that exists for each given tenant id if any exist.
For each tenant id: Create a staff_tenant relationship for each provided staff id.
The above commands should all be performed within a single transaction (ex: call db.commit once) so that if there is an issue on commit it can be easily rolled back, and an appropriate error message sent to the frontend.
Possible validations to include:
Verify the provided staff id's are indeed Staff members.
Verify the provided tenant id's exist.
We probably wont be able to use any of the convenient methods defined in the BaseModel. May need to directly communicate with the db.session to add/remove objects from the session and the call db.session.commit() to commit all bulk changes in a single transaction.
Description
A bulk update on the staff_tenant_link table is required per the figma designs. See issue /issues/439 for more details.
Create a staff_tenant resource with the following url
/staff-tenants
that will accept aPATCH
request with following payload structure:The patch action will:
The above commands should all be performed within a single transaction (ex: call
db.commit
once) so that if there is an issue on commit it can be easily rolled back, and an appropriate error message sent to the frontend.Possible validations to include:
We probably wont be able to use any of the convenient methods defined in the BaseModel. May need to directly communicate with the
db.session
to add/remove objects from the session and the calldb.session.commit()
to commit all bulk changes in a single transaction.See sqlalchemy docs:
Acceptance Criteria
Please list the requirements the implementation of this feature should meet.
The text was updated successfully, but these errors were encountered: