From 98beb610eca3ab2f9196b083589506770e8b95a8 Mon Sep 17 00:00:00 2001 From: Aaron Kitzmiller Date: Wed, 12 Feb 2025 09:40:48 -0500 Subject: [PATCH] It's possible that rebalancing is failing because the billing month is not an integer? --- coldfront/plugins/ifx/views.py | 12 ++++++++---- ifxbilling | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/coldfront/plugins/ifx/views.py b/coldfront/plugins/ifx/views.py index 1ce569084..034f6ff66 100644 --- a/coldfront/plugins/ifx/views.py +++ b/coldfront/plugins/ifx/views.py @@ -398,12 +398,16 @@ def rebalance(request): return Response(data={ 'error': 'invoice_prefix is required' }, status=status.HTTP_400_BAD_REQUEST) if not ifxid: return Response(data={ 'error': 'ifxid is required' }, status=status.HTTP_400_BAD_REQUEST) - if not year: - return Response(data={ 'error': 'year is required' }, status=status.HTTP_400_BAD_REQUEST) - if not month: - return Response(data={ 'error': 'month is required' }, status=status.HTTP_400_BAD_REQUEST) if not requestor_ifxid: return Response(data={ 'error': 'requestor_ifxid is required' }, status=status.HTTP_400_BAD_REQUEST) + try: + year = int(year) + except ValueError: + return Response(data={ 'error': 'year must be an integer' }, status=status.HTTP_400_BAD_REQUEST) + try: + month = int(month) + except ValueError: + return Response(data={ 'error': 'month must be an integer' }, status=status.HTTP_400_BAD_REQUEST) try: diff --git a/ifxbilling b/ifxbilling index e8a11534f..ca32f2af3 160000 --- a/ifxbilling +++ b/ifxbilling @@ -1 +1 @@ -Subproject commit e8a11534f22a0d05c08f7bf26c3d514ccccda29f +Subproject commit ca32f2af3fb9bb9b45de57a489942bb75dd40c74