release-22.2:Backport!6999

Merged Andrey Vertiprahov requested to merge cherry-pick-36b3e755 into release-22.2

#2006 (closed) Fix migration threshold profile without function.

See merge request !6999 (merged)

(cherry picked from commit 36b3e755)

7dbbf7c2 Fix migration threshold profile without function.

Merge request reports