Skip to content

Commit

Permalink
Merge pull request #1503 from the-deep/feature/remove-private-project…
Browse files Browse the repository at this point in the history
…-restrictions

Remove restrictions for Automatic extraction and Assisted tagging
  • Loading branch information
AdityaKhatri authored Jun 13, 2024
2 parents 61da4fa + b93a344 commit e760e16
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/assisted_tagging/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ def validate_lead(self, lead):
af = lead.project.analysis_framework
if af is None or not af.assisted_tagging_enabled:
raise serializers.ValidationError('Assisted tagging is disabled for the Framework used by this project.')
if self.project.is_private:
raise serializers.ValidationError('Assisted tagging is not available for private projects.')
if lead.confidentiality in (Lead.Confidentiality.CONFIDENTIAL, Lead.Confidentiality.RESTRICTED):
raise serializers.ValidationError('Assisted tagging is not available for confidential or restricated leads')
return lead


class DraftEntryGqlSerializer(
ProjectPropertySerializerMixin, DraftEntryBaseSerializer, UserResourceCreatedMixin, serializers.ModelSerializer
ProjectPropertySerializerMixin,
DraftEntryBaseSerializer,
UserResourceCreatedMixin,
serializers.ModelSerializer,
):
class Meta:
model = DraftEntry
Expand Down

0 comments on commit e760e16

Please sign in to comment.