Skip to content

Commit

Permalink
📝 [#498] Document that keys need to remain in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Nov 22, 2024
1 parent c80cee7 commit 6b53eaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/openarchiefbeheer/destruction/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ def attach_report_to_zaak(
def get_selection_key_for_review(
destruction_list: "DestructionList", context: str
) -> str:
"""
Warning! This key needs to remain in sync with the key created by the frontend,
since the frontend need to be able to retrieve the pre-populates selection
in the review page. See github issue #498
"""
return f"destruction-list-{context}-{destruction_list.uuid}-{ListStatus.ready_to_review}"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ import { ReviewDestructionListAction } from "./DestructionListReview.action";
import "./DestructionListReview.css";
import { DestructionListReviewContext } from "./DestructionListReview.loader";

/**
* Warning! This key needs to remain in sync with the key created by the backend,
* since the backend can pre-populate the selection after a review is processed by
* the record manager. See github issue #498
*/
export const getDestructionListReviewKey = (id: string, status: string) =>
`destruction-list-review-${id}-${status}`;

Expand Down

0 comments on commit 6b53eaa

Please sign in to comment.