Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-4540

Incorrect year range in Ingress flow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • January 2024, 2024Q1
    • None
    • None
    • None

      When we try to post January report data via "ingress/reports" endpoint, we get

      E           iqe_cost_management_api.exceptions.ApiException: (400)
      E           Reason: Bad Request
      E           HTTP response headers: HTTPHeaderDict({'Date': 'Tue, 02 Jan 2024 10:13:36 GMT', 'Server': 'WSGIServer/0.2 CPython/3.9.18', 'Content-Type': 'application/json', 'Vary': 'Accept, origin', 'Allow': 'GET, POST, HEAD, OPTIONS', 'X-Frame-Options': 'DENY', 'Content-Length': '128', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'same-origin'})
      E           HTTP response body: {"errors":[{"detail":"Invalid bill, year must be 2023 or 2023 and month must be 12 or 01","source":"bill_period","status":400}]}
      

       

      Apparently we have a small bug in determining the year range in validate method  koku/api/ingress/reports/serializers.py

              rhn-support-esebesto Eva Šebestová
              rhn-support-esebesto Eva Šebestová
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: