forked from github/plane
chore: update issue link (#4450)
This commit is contained in:
parent
dbc0d7019b
commit
c2ce3ada14
@ -315,7 +315,7 @@ class IssueLinkSerializer(BaseSerializer):
|
|||||||
if IssueLink.objects.filter(
|
if IssueLink.objects.filter(
|
||||||
url=validated_data.get("url"),
|
url=validated_data.get("url"),
|
||||||
issue_id=instance.issue_id,
|
issue_id=instance.issue_id,
|
||||||
).exists():
|
).exclude(pk=instance.id).exists():
|
||||||
raise serializers.ValidationError(
|
raise serializers.ValidationError(
|
||||||
{"error": "URL already exists for this Issue"}
|
{"error": "URL already exists for this Issue"}
|
||||||
)
|
)
|
||||||
|
@ -462,7 +462,7 @@ class IssueLinkSerializer(BaseSerializer):
|
|||||||
if IssueLink.objects.filter(
|
if IssueLink.objects.filter(
|
||||||
url=validated_data.get("url"),
|
url=validated_data.get("url"),
|
||||||
issue_id=instance.issue_id,
|
issue_id=instance.issue_id,
|
||||||
).exists():
|
).exclude(pk=instance.id).exists():
|
||||||
raise serializers.ValidationError(
|
raise serializers.ValidationError(
|
||||||
{"error": "URL already exists for this Issue"}
|
{"error": "URL already exists for this Issue"}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user