fix: switch to datetime.now() instead of our get_datetime()

`get_datetime()` will query the DB to get the system timezone, not something we currently have.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-03-28 16:09:26 +05:30
parent 4b2fde1d8f
commit 9940868063
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -71,13 +71,12 @@ def _new_site(
if not db_name: if not db_name:
import hashlib import hashlib
from datetime import datetime
from frappe.utils.data import get_datetime
db_name = ( db_name = (
"_" "_"
+ hashlib.sha1( + hashlib.sha1(
(os.path.realpath(frappe.get_site_path()) + get_datetime().isoformat()).encode(), (os.path.realpath(frappe.get_site_path()) + datetime.now().isoformat()).encode(),
usedforsecurity=False, usedforsecurity=False,
).hexdigest()[:16] ).hexdigest()[:16]
) )