Skip to content

Commit 5706f39

Browse files
committed
fix insert new apps to preven apple with bad data
1 parent a2ca3e9 commit 5706f39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adscrawler/app_stores/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def insert_new_apps(
2828
dicts: list[dict], database_connection: PostgresCon, crawl_source: str, store: int
2929
) -> None:
3030
df = pd.DataFrame(dicts)
31-
df["store_id"].str.match(r"^[0-9].*\.")
32-
found_bad_ids = df[df["store"] == store, "store_id"].str.match(r"^[0-9].*\.").any()
31+
found_bad_ids = df.loc[df["store"] == 2, "store_id"].str.match(r"^[0-9].*\.").any()
3332
if found_bad_ids:
3433
logger.error(f"Scrape {store=} {crawl_source=} found bad store_ids")
3534
raise ValueError("Found bad store_ids")

0 commit comments

Comments
 (0)