Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic

Snapshot of the working tree on srv1071960 (branch main), taken during
server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
Shubhankar45
2026-11-07 05:43:12 +00:00
parent b001e2d03c
commit 0d30c58bf0
98 changed files with 1878 additions and 573 deletions
+5 -1
View File
@@ -6,7 +6,7 @@ from sqlalchemy.orm import selectinload
from app.common.enums import DCRStatus, ReportType
from app.common.repository import BaseRepository
from app.reports.models import ChemistCall, DailyCallReport, DoctorCall
from app.reports.models import ChemistCall, DailyCallReport, DoctorCall, StockistCall
class DCRRepository(BaseRepository[DailyCallReport]):
@@ -19,6 +19,7 @@ class DCRRepository(BaseRepository[DailyCallReport]):
.options(
selectinload(DailyCallReport.doctor_calls).selectinload(DoctorCall.doctor),
selectinload(DailyCallReport.chemist_calls).selectinload(ChemistCall.chemist),
selectinload(DailyCallReport.stockist_calls).selectinload(StockistCall.stockist),
selectinload(DailyCallReport.missed_visits),
selectinload(DailyCallReport.mr),
selectinload(DailyCallReport.headquarters),
@@ -29,6 +30,9 @@ class DCRRepository(BaseRepository[DailyCallReport]):
selectinload(DailyCallReport.plan)
.selectinload(DailyCallReport.chemist_calls)
.selectinload(ChemistCall.chemist),
selectinload(DailyCallReport.plan)
.selectinload(DailyCallReport.stockist_calls)
.selectinload(StockistCall.stockist),
selectinload(DailyCallReport.actual),
)
# The session keeps objects after commit (expire_on_commit=False), so without this the