fix: Fix params' default value of function
1. Do not use mutable types as method parameter defaults Change-Id: Ie310114f53981451b50a366a0869be72bbfb4e01
This commit is contained in:
parent
988f38cc41
commit
ebf89092fd
@ -28,7 +28,7 @@ from skyline_apiserver.client import utils
|
|||||||
async def list_images(
|
async def list_images(
|
||||||
profile: schemas.Profile,
|
profile: schemas.Profile,
|
||||||
session: Session,
|
session: Session,
|
||||||
filters: Dict[str, Any] = {},
|
filters: Dict[str, Any] = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
try:
|
try:
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
|
@ -29,9 +29,10 @@ async def list_projects(
|
|||||||
profile: schemas.Profile,
|
profile: schemas.Profile,
|
||||||
all_projects: bool,
|
all_projects: bool,
|
||||||
session: Session,
|
session: Session,
|
||||||
search_opts: Dict[str, Any] = {},
|
search_opts: Dict[str, Any] = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
try:
|
try:
|
||||||
|
search_opts = search_opts if search_opts else {}
|
||||||
kc = await utils.keystone_client(session=session, region=profile.region)
|
kc = await utils.keystone_client(session=session, region=profile.region)
|
||||||
if not all_projects:
|
if not all_projects:
|
||||||
search_opts["user"] = profile.user.id
|
search_opts["user"] = profile.user.id
|
||||||
|
Loading…
Reference in New Issue
Block a user