Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bugin create_random_data #2027

Merged
merged 1 commit into from May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.md
@@ -1,5 +1,8 @@
### 0.24.0 (Major Release)

#### Fixes a sporadic failure in create_random_data
Fixes a bug where in an edge case create_random.data.date_generator would raise "ValueError: empty range for randrange()".

### 0.23.0 (Major Release)

#### Enhanced customisation of search results
Expand Down
2 changes: 1 addition & 1 deletion opal/management/commands/create_random_data.py
Expand Up @@ -100,7 +100,7 @@ def date_generator(*args, **kwargs):
else:
first_day = 1

if first_day == last_day:
if first_day >= last_day:
day = first_day
else:
day = random.randint(first_day, last_day)
Expand Down