DIVYANSHI SINGH commited on
Commit
0f29378
·
1 Parent(s): 4c1fc4e

Revert database path to fix HF Docker permissions issue

Browse files
Files changed (1) hide show
  1. database.py +2 -6
database.py CHANGED
@@ -17,12 +17,8 @@ from pathlib import Path
17
  import pandas as pd
18
  from datetime import datetime
19
 
20
- # Database file path: utilize Render's persistent disk at /data if available, otherwise local folder.
21
- DATA_DIR = Path("/data")
22
- if DATA_DIR.exists() and DATA_DIR.is_dir():
23
- DB_PATH = DATA_DIR / "invoices.db"
24
- else:
25
- DB_PATH = Path(__file__).parent / "invoices.db"
26
 
27
 
28
  def init_db():
 
17
  import pandas as pd
18
  from datetime import datetime
19
 
20
+ # Database file path relative to the project folder
21
+ DB_PATH = Path(__file__).parent / "invoices.db"
 
 
 
 
22
 
23
 
24
  def init_db():