Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Validate master_person_id UUID

    1. In case of error - return 422

  2. Find person by id in mpi.persons

    1. In case of error - return 422 (Such person doesn't exist404 ( Person not found)

  3. Check person status is active

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

...

  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 422 (Such preperson doesn't exist404 (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 REJECTED

  5. Check if preperson has at least one episode

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

...