LPS-36122 fix redirect logic after creating documents