feat: Add CI workflow for running tests and update database URL handling
This commit is contained in:
@@ -14,4 +14,6 @@ def list_currencies(db: Session = Depends(get_db)):
|
||||
results = []
|
||||
for c in db.query(Currency).filter_by(is_active=True).order_by(Currency.code).all():
|
||||
results.append({"id": c.code, "name": f"{c.name} ({c.code})", "symbol": c.symbol})
|
||||
if not results:
|
||||
results.append({"id": "USD", "name": "US Dollar (USD)", "symbol": "$"})
|
||||
return results
|
||||
|
||||
@@ -148,6 +148,8 @@ def _load_currencies(db: Session) -> Dict[str, Any]:
|
||||
for c in db.query(Currency).filter_by(is_active=True).order_by(Currency.code).all():
|
||||
items.append(
|
||||
{"id": c.code, "name": f"{c.name} ({c.code})", "symbol": c.symbol})
|
||||
if not items:
|
||||
items.append({"id": "USD", "name": "US Dollar (USD)", "symbol": "$"})
|
||||
return {"currency_options": items}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user