1👍
Django (I have no experience of non-rel) caches the related objects queryset. You can avoid this by refetching the instance from the database.
instance = Lesson.objects.get(pk=form.instance.id)
len(instance.lessonstep_set.all())
Source:stackexchange.com