mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
add more docs on the bulk job launch feature
better error message
This commit is contained in:
@@ -2052,7 +2052,7 @@ class BulkHostCreateSerializer(serializers.Serializer):
|
||||
try:
|
||||
Host.objects.bulk_create(result)
|
||||
except Exception as e:
|
||||
raise serializers.ValidationError({"detail": _(f"{e}")})
|
||||
raise serializers.ValidationError({"detail": _(f"cannot create host, host creation error {e}")})
|
||||
new_total_hosts = old_total_hosts + len(result)
|
||||
request = self.context.get('request', None)
|
||||
changes = {'total_hosts': [old_total_hosts, new_total_hosts]}
|
||||
|
||||
Reference in New Issue
Block a user