fix(core): Conduct kwargs check fr ticket comment serializer during init

ref: #773
This commit is contained in:
2025-05-27 07:35:20 +09:30
parent f440788dae
commit 37ff9d38cb

View File

@ -175,6 +175,9 @@ class ModelSerializer(
super().__init__(*args, **kwargs)
if 'context' not in kwargs:
return
if getattr(kwargs['context'].get('view'), 'action', '') in ['create', 'partial_update', 'update']:
self.fields.fields['parent'].write_only = True