Skip to content

Commit

Permalink
fix: invalid arg parser
Browse files Browse the repository at this point in the history
  • Loading branch information
GareArc committed Jan 26, 2025
1 parent 11270ac commit 4aa5753
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/controllers/console/billing/compliance.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from argparse import ArgumentParser

from flask import request
from flask_login import current_user # type: ignore
from flask_restful import Resource # type: ignore
from flask_restful import Resource, reqparse # type: ignore

from libs.helper import extract_remote_ip
from libs.login import login_required
from services.billing_service import BillingService

from .. import api
from ..wraps import account_initialization_required, only_edition_cloud, setup_required
from ..wraps import (account_initialization_required, only_edition_cloud,
setup_required)


class ComplianceListApi(Resource):
Expand All @@ -30,8 +30,8 @@ class ComplianceApi(Resource):
@account_initialization_required
@only_edition_cloud
def get(self):
parser = ArgumentParser()
parser.add_argument("doc_name", type=str, required=True)
parser = reqparse.RequestParser()
parser.add_argument("doc_name", type=str, required=True, location="args")
args = parser.parse_args()

ip_address = extract_remote_ip(request)
Expand Down

0 comments on commit 4aa5753

Please sign in to comment.