mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Merge pull request #430 from ryanpetrello/fix-7620
don't show polymorphic_ctype in unique validation error messaging
This commit is contained in:
@@ -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