Skip to content
Snippets Groups Projects

Stt 2006 prioritizer history atmv read only

Merged Mark Ferguson requested to merge STT-2006-prioritizer-history-atmv-read-only into main
5 files
+ 36
7
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -252,8 +252,20 @@ def obspec_disposition_prioritize(request: Request) -> Response:
request.repo, AvailableTimeModelVersion, request.matchdict["available_time_model_version_id"]
)
updated_av = prioritize_osds(av, atmv)
# Prioritize OSDs - this will update the AV and make it and the associated ATMV as read-only
updated_av, updated_atmv = prioritize_osds(av, atmv)
# request.repo.allocation_version_repo.update(update_av)
# Update the ATMV to read only and update version history
updated_atmv.version_history += (
f"\n{datetime.now()} - Prioritized with ATM Version ID {atmv.available_time_model_version_id} by user "
f"{request.identity.user_id}, {request.identity.first_name} {request.identity.last_name}"
)
request.repo.available_time_model_version_repo.update(updated_atmv)
updated_av.version_history += (
f"\n{datetime.now()} - Prioritized with Allocation Version ID {updated_av.allocation_version_id} by user "
f"{request.identity.user_id}, {request.identity.first_name} {request.identity.last_name}"
)
request.repo.allocation_version_repo.update(updated_av)
return Response(json_body=updated_av.__json__())
Loading