Skip to content

Commit f88fb57

Browse files
committed
fix: Error when no report files passed in to render_reports
1 parent b33607d commit f88fb57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

code_annotations/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import traceback
88

99
import click
10+
from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT
1011

1112
from code_annotations.base import AnnotationConfig, ConfigurationException
1213
from code_annotations.find_django import DjangoSearch
@@ -241,6 +242,11 @@ def generate_docs(config_file, verbosity, report_files):
241242
try:
242243
config = AnnotationConfig(config_file, verbosity)
243244

245+
if not report_files:
246+
raise ConfigurationException(
247+
"No report files provided. Please provide one or more report files to generate docs from."
248+
)
249+
244250
for key in (
245251
"report_template_dir",
246252
"rendered_report_dir",

0 commit comments

Comments
 (0)