Fixes #12109: Fix migration error when replicating more than 100 job results

This commit is contained in:
jeremystretch
2023-03-31 08:59:15 -04:00
parent f18f6e2856
commit cdad50e051
3 changed files with 7 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ def replicate_jobresults(apps, schema_editor):
)
if len(jobs) == 100:
Job.objects.bulk_create(jobs)
jobs = []
if jobs:
Job.objects.bulk_create(jobs)

View File

@@ -24,7 +24,7 @@ from netbox.constants import RQ_QUEUE_DEFAULT, RQ_QUEUE_HIGH, RQ_QUEUE_LOW
# Environment setup
#
VERSION = '3.5-beta1'
VERSION = '3.5.0-dev'
# Hostname
HOSTNAME = platform.node()