perf: ticket action (#9090)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2022-11-17 15:07:23 +08:00
committed by GitHub
parent 73c2155864
commit 3a62abf381
4 changed files with 10 additions and 2 deletions

View File

@@ -44,8 +44,7 @@ class ApplyAssetSerializer(BaseApplyAssetSerializer, TicketApplySerializer):
attrs['type'] = 'apply_asset'
attrs = super().validate(attrs)
if self.is_final_approval and (
not attrs.get('apply_nodes')
and not attrs.get('apply_assets')
not attrs.get('apply_nodes') and not attrs.get('apply_assets')
):
raise serializers.ValidationError({
'apply_nodes': asset_or_node_help_text,