mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03: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
|
||||
if not (self.pk and self.pk == obj.pk):
|
||||
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:
|
||||
raise ValidationError(errors)
|
||||
|
||||
Reference in New Issue
Block a user