make search better
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
import yaml
|
||||
import re
|
||||
from flask import Flask, request, jsonify
|
||||
|
||||
app = Flask(__name__)
|
||||
@@ -23,7 +24,7 @@ def get_groups():
|
||||
for detail in details:
|
||||
# Check if 'ad_group' exists and is not None before accessing it
|
||||
ad_group = detail.get('ad_group')
|
||||
if isinstance(ad_group, str) and ad_group.lower() == group_name.lower():
|
||||
if isinstance(ad_group, str) and re.search(re.escape(group_name.lower()), ad_group.lower()):
|
||||
gpos.append({
|
||||
"gpo": gpo,
|
||||
"local_group": detail['local_group'],
|
||||
|
||||
Reference in New Issue
Block a user