Query changes for DB
This commit is contained in:
@@ -131,12 +131,7 @@ def list_patchnotes(since: str | None = None):
|
||||
logging.info("last_login" + str(last_login))
|
||||
if since:
|
||||
logging.info("Went into if since")
|
||||
query = {
|
||||
"patch_date": {
|
||||
"$gte": since,
|
||||
"$lte": last_login
|
||||
}
|
||||
}
|
||||
|
||||
try:
|
||||
datetime.strptime(since, "%Y-%m-%d")
|
||||
except ValueError:
|
||||
@@ -145,7 +140,12 @@ def list_patchnotes(since: str | None = None):
|
||||
detail="since must be YYYY-MM-DD",
|
||||
status=400,
|
||||
)
|
||||
|
||||
query = {
|
||||
"patch_date": {
|
||||
"$gte": since,
|
||||
"$lte": last_login.last_login
|
||||
}
|
||||
}
|
||||
|
||||
# 3) Datum validieren (nur wenn vorhanden)
|
||||
elif since is None:
|
||||
|
||||
Reference in New Issue
Block a user