Allow None for max_id during migrations

This allows empty databases with no max_id to run.

fixes #869
This commit is contained in:
Matt Jibson 2015-11-13 15:41:39 -05:00
parent fb483df1b9
commit 2e1b49b009

View file

@ -126,6 +126,7 @@ def yield_random_entries(batch_query, primary_key_field, batch_size, max_id):
an "id" field which can be inspected. an "id" field which can be inspected.
""" """
max_id = max(max_id, 1)
allocator = CompletedKeys(max_id + 1) allocator = CompletedKeys(max_id + 1)
try: try: