We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 880697b commit 67f7197Copy full SHA for 67f7197
apps/knowledge/serializers/document.py
@@ -131,7 +131,7 @@ def get_meta_valid_map():
131
132
def is_valid(self, *, document: Document = None):
133
super().is_valid(raise_exception=True)
134
- if 'meta' in self.data and self.data.get('meta') is not None:
+ if 'meta' in self.data and self.data.get('meta') is not None and self.data.get('meta') != {}:
135
knowledge_meta_valid_map = self.get_meta_valid_map()
136
valid_class = knowledge_meta_valid_map.get(document.type)
137
valid_class(data=self.data.get('meta')).is_valid(raise_exception=True)
0 commit comments