chore: skip unnecessary key checks prior to accessing a dictionary (#4497)
This commit is contained in:
@@ -47,10 +47,10 @@ class AppService:
|
||||
elif args['mode'] == 'channel':
|
||||
filters.append(App.mode == AppMode.CHANNEL.value)
|
||||
|
||||
if 'name' in args and args['name']:
|
||||
if args.get('name'):
|
||||
name = args['name'][:30]
|
||||
filters.append(App.name.ilike(f'%{name}%'))
|
||||
if 'tag_ids' in args and args['tag_ids']:
|
||||
if args.get('tag_ids'):
|
||||
target_ids = TagService.get_target_ids_by_tag_ids('app',
|
||||
tenant_id,
|
||||
args['tag_ids'])
|
||||
|
Reference in New Issue
Block a user