Commit d3f940a2 authored by Florent Chehab's avatar Florent Chehab
Browse files

Fix missing versions

parent c60e24c6
......@@ -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
Supports Markdown
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