diff --git a/app/scodoc/sco_edit_formation.py b/app/scodoc/sco_edit_formation.py
index 752bdef68..9167e7620 100644
--- a/app/scodoc/sco_edit_formation.py
+++ b/app/scodoc/sco_edit_formation.py
@@ -378,7 +378,10 @@ def ue_move(ue_id, after=0, redirect=1):
     after = int(after)  # 0: deplace avant, 1 deplace apres
     if after not in (0, 1):
         raise ValueError('invalid value for "after"')
-    others = ue.formation.ues.order_by(UniteEns.numero).all()
+    others_q = ue.formation.ues.order_by(UniteEns.numero)
+    if ue.formation.is_apc():
+        others_q = others_q.filter_by(semestre_idx=ue.semestre_idx)
+    others = others_q.all()
     if len({o.numero for o in others}) != len(others):
         # il y a des numeros identiques !
         scu.objects_renumber(db, others)