mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Merge pull request #3292 from kialam/fix-dummy-data-generator-script-errors
Fix various errors when trying to run `make bulk_data`. Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
d1bc013da9
@ -7,7 +7,7 @@ from django.db.models.signals import pre_delete # noqa
|
||||
|
||||
# AWX
|
||||
from awx.main.models.base import ( # noqa
|
||||
BaseModel, prevent_search, CLOUD_INVENTORY_SOURCES, VERBOSITY_CHOICES
|
||||
BaseModel, PrimordialModel, prevent_search, CLOUD_INVENTORY_SOURCES, VERBOSITY_CHOICES
|
||||
)
|
||||
from awx.main.models.unified_jobs import ( # noqa
|
||||
UnifiedJob, UnifiedJobTemplate, StdoutMaxBytesExceeded
|
||||
|
||||
@ -44,6 +44,7 @@ from awx.main.models import ( # noqa
|
||||
Team, User, WorkflowJobTemplate, WorkflowJobTemplateNode,
|
||||
batch_role_ancestor_rebuilding,
|
||||
)
|
||||
|
||||
from awx.main.signals import ( # noqa
|
||||
disable_activity_stream,
|
||||
disable_computed_fields
|
||||
@ -695,7 +696,7 @@ def make_the_data():
|
||||
continue
|
||||
# Bulk create in chunks with maximum chunk size
|
||||
MAX_BULK_CREATE = 100
|
||||
for j in range((n / MAX_BULK_CREATE) + 1):
|
||||
for j in range((n // MAX_BULK_CREATE) + 1):
|
||||
n_subgroup = MAX_BULK_CREATE
|
||||
if j == n / MAX_BULK_CREATE:
|
||||
# on final pass, create the remainder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user