Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  1. Validate merge_person_id UUID

    1. In case of error - return 422

  2. Find preperson by id in mpi.prepersons

    1. In case of error - return 404 (Preperson not found)

  3. Check preperson status is active in mpi.prepersons

    1. In case of error - return 409 (Preperson is not active)

  4. Check if exists another preperson merge requests with status NEW or APPROVED for this preperson

    1. if exists - update status of another requests to CANCELLED

  5. Check if preperson has at least one episode( status!= "entered_in_error")

    1. if no episodes - return 409 (Preperson has no episodes)

...

In case no auth methods found (null) - return error with code 409 (Person has no auth methods)

Save object to DB

il.merge_requeststable

...