fix: 假单开启后无对应会员稳定走假池,避免真假交替
This commit is contained in:
@@ -20,10 +20,15 @@ def is_club_fake_grab_enabled(club_id: str) -> bool:
|
||||
try:
|
||||
from jituan.models import Club
|
||||
club = Club.query.filter(club_id=cid).first()
|
||||
if not club and cid != cid.lower():
|
||||
club = Club.query.filter(club_id=cid.lower()).first()
|
||||
if not club:
|
||||
return False
|
||||
cfg = club.config_json or {}
|
||||
return bool(cfg.get(CONFIG_KEY))
|
||||
raw = cfg.get(CONFIG_KEY)
|
||||
if isinstance(raw, str):
|
||||
return raw.strip().lower() in ('1', 'true', 'yes', 'on')
|
||||
return bool(raw)
|
||||
except Exception:
|
||||
logger.exception('read fake_grab_order_enabled failed club=%s', cid)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user