remove mutable default arg

This commit is contained in:
John Newman 2019-10-08 12:48:59 +01:00
parent 27237693c3
commit 92b3898c21

View File

@ -332,13 +332,13 @@ class ApiKey(BaseModel, dict):
class UsagePlan(BaseModel, dict):
def __init__(self, name=None, description=None, apiStages=[],
def __init__(self, name=None, description=None, apiStages=None,
throttle=None, quota=None):
super(UsagePlan, self).__init__()
self['id'] = create_id()
self['name'] = name
self['description'] = description
self['apiStages'] = apiStages
self['apiStages'] = apiStages if apiStages else []
self['throttle'] = throttle
self['quota'] = quota