Skip to content

Commit eaaec17

Browse files
fix the issues of doctypes having 0 as a doctype
1 parent 42bce45 commit eaaec17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sde_collections/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Meta:
125125
)
126126

127127
def get_document_type(self, obj):
128-
if obj.document_type is not None:
128+
if obj.document_type and obj.document_type != 0:
129129
return obj.get_document_type_display()
130130
elif obj.collection.document_type is not None:
131131
return obj.collection.get_document_type_display()

0 commit comments

Comments
 (0)