Description
After pulling the latest changes from the main branch, running database migrations (uv run task db_migrate) or starting the API server fails with a NameError in server/polar/models/refund.py. The issue was introduced in commit 8fed8aae6d ("server/refund: add Refund.payment and refactor service").
Current Behavior
Running any command that imports the models (e.g., uv run task db_migrate or uv run task api) fails with:
NameError: name 'Order' is not defined
Expected Behavior
Database migrations and server startup should work without errors. The fix is to wrap the type annotations in quotes to make them forward references:
Screenshots
Environment:
Operating System: Linux (Ubuntu)
Browser: brave
Python Version: 3.13