Skip to content

Commit 133e4a1

Browse files
committed
only allow one year for document-level data
1 parent 5c4f268 commit 133e4a1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

regcensus/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ def get_values(series, jurisdiction, year, documentType=1, summary=True,
157157
url_call += f'&labelLevel={labellevel}'
158158

159159
# If multiple years are given, parses the list into a string
160+
if not summary and type(year) == list:
161+
print(
162+
'WARNING: document-level data is only returnable for a single '
163+
'year at a time. Returning the first year requested.'
164+
)
165+
year = year[0]
160166
if type(year) == list:
161167
# If dateIsRange, parses the list to include all years
162168
if dateIsRange and len(year) == 2:

0 commit comments

Comments
 (0)