|
|
@ -648,20 +648,15 @@ def analyze_equity_options( |
|
|
"""Analyzes 3 options for home equity: leave untouched, |
|
|
"""Analyzes 3 options for home equity: leave untouched, |
|
|
cash-out refi and invest, or use for rental property.""" |
|
|
cash-out refi and invest, or use for rental property.""" |
|
|
|
|
|
|
|
|
db_path = os.path.join( |
|
|
|
|
|
os.path.dirname(__file__), '..', 'data', 'properties.db' |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
conn = sqlite3.connect(db_path) |
|
|
conn = _get_conn() |
|
|
conn.row_factory = sqlite3.Row |
|
|
|
|
|
cur = conn.cursor() |
|
|
cur = conn.cursor() |
|
|
cur.execute( |
|
|
cur.execute( |
|
|
"SELECT * FROM properties WHERE id=? AND is_active=1", |
|
|
"SELECT * FROM properties WHERE id=? AND is_active=1", |
|
|
(property_id,), |
|
|
(property_id,), |
|
|
) |
|
|
) |
|
|
row = cur.fetchone() |
|
|
row = cur.fetchone() |
|
|
conn.close() |
|
|
_close_conn(conn) |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
return { |
|
|
return { |
|
|
"error": f"Database error: {str(e)}", |
|
|
"error": f"Database error: {str(e)}", |
|
|
|