Commit d3f940a2 authored by Florent Chehab's avatar Florent Chehab

Fix missing versions

parent c60e24c6
Pipeline #27354 passed with stages
in 2 minutes and 32 seconds
......@@ -30,7 +30,7 @@ class MyModelVersionnedSerializer(MyModelSerializer):
content_type_id = serializers.SerializerMethodField()
def get_nb_versions(self, obj):
if self.context['view'].action != 'list':
if self.FORCE_FULL_DISPLAY or self.context['view'].action != 'list':
versions = Version.objects.get_for_object(obj)
return len(versions)
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment