diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2021-05-17 08:13:48 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2021-05-17 08:13:48 +0100 |
commit | 62617d6ef952c24e134b4bc403263ed990a42ec8 (patch) | |
tree | a991c2758d3acf306284e56ed617e00772a36287 /datamaps/api/api.py | |
parent | a5b4f46b55ee39409126da978677f54e271060c1 (diff) |
fixed bug whereby month year was not used in creating quarter
Diffstat (limited to 'datamaps/api/api.py')
-rw-r--r-- | datamaps/api/api.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/datamaps/api/api.py b/datamaps/api/api.py index b6d8025..4073fbc 100644 --- a/datamaps/api/api.py +++ b/datamaps/api/api.py @@ -36,5 +36,9 @@ def project_data_from_master_month_api(master_file: str, month: int, year: int): else: pass # TODO: raise exception here + + # from that, we can work out what quarter year we are dealing with + if quarter == 4: + year = year - 1 m = Master(Quarter(quarter, year), master_file, month) return m |