diff --git a/smash/web/models/visit.py b/smash/web/models/visit.py
index 4fb79a095798f01c269095fb6ffdcc1f5397649c..c44dc7093ba1c7e265f8bdf962333f46568c5344 100644
--- a/smash/web/models/visit.py
+++ b/smash/web/models/visit.py
@@ -85,30 +85,16 @@ class Visit(models.Model):
 
 @receiver(post_save, sender=Visit)
 def check_visit_number(sender, instance, **kwargs):
-    # no other solution to ensure the visit_number is in cronological order than to sort the whole list
+    # no other solution to ensure the visit_number is in cronological order than to sort the whole list if there are future visits
     visit = instance
-    if visit.subject is not None: #not sure if select_for_update has an effect
+    if visit.subject is not None: #not sure if select_for_update has an effect, the tests work as well without it
         visits_before = Visit.objects.select_for_update().filter(subject=visit.subject).filter(datetime_begin__lt=visit.datetime_begin).count()
         # we need to sort the future visits respect to this one, if any
         visits = Visit.objects.select_for_update().filter(subject=visit.subject).filter(datetime_begin__gte=visit.datetime_begin).order_by('datetime_begin','datetime_end')
-        with transaction.atomic(): #not sure if has an effect
+        with transaction.atomic(): #not sure if it has an effect, the tests work as well without it
             for i, v in enumerate(visits):
                 if v.visit_number != (visits_before + i + 1):
                     visit_number = (visits_before + i + 1)
                     Visit.objects.filter(id=v.id).update(visit_number=visit_number) # does not rise post_save, we avoid recursion
                     if v.id == visit.id:
                         visit.visit_number = v.visit_number
-
-
-# @receiver(post_save, sender=Visit)
-# def update_visit_number(sender, instance, **kwargs):
-#     n = kwargs.get('n', 1)
-#     visit = instance
-#     if visit.subject is not None:
-#         count = Visit.objects.filter(subject=visit.subject).filter(datetime_begin__lte=visit.datetime_begin).count()
-#         if count != visit.visit_number:
-#             visit.visit_number = count
-#             visit.save()
-#             subject_visits = Visit.objects.filter(subject=visit.subject).all()
-#             for subject_visit in subject_visits:
-#                 update_visit_number(sender, subject_visit, n=(n+1))
\ No newline at end of file