Sign in before filtering the order export
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -331,6 +331,9 @@ def _load_order_export(client, day: date, prefixes: list[str]) -> tuple[str, str
|
||||
"""Prefer the filtered export. A failed post still returns the full CSV."""
|
||||
if getattr(client, "session", None) is None:
|
||||
return client.fetch_customer_orders()
|
||||
# The report GET redirects to login until the client has signed in.
|
||||
if hasattr(client, "login") and not getattr(client, "_logged_in", False):
|
||||
client.login()
|
||||
try:
|
||||
return export_filtered_customer_orders(client, day, prefixes)
|
||||
except (_FilterMiss, OSError):
|
||||
|
||||
Reference in New Issue
Block a user