From eaaec175dae91b3850dacb3e746f9e839f218503 Mon Sep 17 00:00:00 2001 From: Bishwas Praveen Date: Wed, 18 Sep 2024 14:26:47 -0500 Subject: [PATCH] fix the issues of doctypes having 0 as a doctype --- sde_collections/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sde_collections/serializers.py b/sde_collections/serializers.py index 9623e85d..2d1b9511 100644 --- a/sde_collections/serializers.py +++ b/sde_collections/serializers.py @@ -125,7 +125,7 @@ class Meta: ) def get_document_type(self, obj): - if obj.document_type is not None: + if obj.document_type and obj.document_type != 0: return obj.get_document_type_display() elif obj.collection.document_type is not None: return obj.collection.get_document_type_display()