mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
don't show polymorphic_ctype in unique validation error messaging
see: https://github.com/ansible/ansible-tower/issues/7620
This commit is contained in:
committed by
Matthew Jones
parent
70f8ec78de
commit
96572fe3d4
@@ -309,7 +309,10 @@ class PrimordialModel(CreatedModifiedModel):
|
|||||||
continue
|
continue
|
||||||
if not (self.pk and self.pk == obj.pk):
|
if not (self.pk and self.pk == obj.pk):
|
||||||
errors.append(
|
errors.append(
|
||||||
'%s with this (%s) combination already exists.' % (model.__name__, ', '.join(ut))
|
'%s with this (%s) combination already exists.' % (
|
||||||
|
model.__name__,
|
||||||
|
', '.join(set(ut) - {'polymorphic_ctype'})
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if errors:
|
if errors:
|
||||||
raise ValidationError(errors)
|
raise ValidationError(errors)
|
||||||
|
|||||||
Reference in New Issue
Block a user