Spaces:
Running
Running
Update main.py
Browse files3648 unmodified lines364936503651365236533654365536563657365836593648 unmodified linesexpiry_date = datetime.strptime(batch["expiry_date"], "%Y-%m-%d").date() if isinstance(batch["expiry_date"], str) else batch["expiry_date"]days_until = (expiry_date - today).daysif days_until <= 90:batch["alert_level"] = "critical"elif days_until <= 120:batch["alert_level"] = "warning"elif days_until <= 180:batch["alert_level"] = "info"else:batch["alert_level"] = "good"3648 unmodified lines364936503651365236533654365536563657365836593648 unmodified linesexpiry_date = datetime.strptime(batch["expiry_date"], "%Y-%m-%d").date() if isinstance(batch["expiry_date"], str) else batch["expiry_date"]days_until = (expiry_date - today).daysif days_until <= 120:batch["alert_level"] = "critical"elif days_until <= 180:batch["alert_level"] = "warning"elif days_until <= 240:batch["alert_level"] = "info"else:batch["alert_level"] = "good"
main.py+3-3