Skip to content

Commit 89dc893

Browse files
authored
Merge pull request #648 from DocNow/max_results_with_no_context_annotations
Fix bug where --max-results could not be set with --no-context-annota…
2 parents e215d89 + 73f0e07 commit 89dc893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twarc/command2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _validate_max_results(context, parameter, value):
423423
)
424424
if value < 10 or value > 500:
425425
raise click.BadParameter("--max-results must be between 10 and 500")
426-
if value > 100 and has_context_annotations:
426+
if value > 100 and (has_context_annotations and not no_context_annotations_set):
427427
raise click.BadParameter(
428428
"--max-results cannot be greater than 100 when using context annotations. Set --no-context-annotations to remove them, or don't specify them in --tweet-fields."
429429
)

0 commit comments

Comments
 (0)