mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix hoyolab missing diary date
This commit is contained in:
parent
84682e7fae
commit
124c7533d7
@ -150,7 +150,7 @@ class LedgerPlugin(Plugin):
|
|||||||
async def save_ledger_data(
|
async def save_ledger_data(
|
||||||
history_data_ledger: "HistoryDataLedgerServices", uid: int, ledger_data: "Diary"
|
history_data_ledger: "HistoryDataLedgerServices", uid: int, ledger_data: "Diary"
|
||||||
) -> bool:
|
) -> bool:
|
||||||
month = int(ledger_data.date.split("-")[1])
|
month = int((ledger_data.date or datetime.now().strftime("%Y-%m-%d")).split("-")[1])
|
||||||
if month == ledger_data.month:
|
if month == ledger_data.month:
|
||||||
return False
|
return False
|
||||||
model = history_data_ledger.create(uid, ledger_data)
|
model = history_data_ledger.create(uid, ledger_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user