File tree Expand file tree Collapse file tree 4 files changed +33
-25
lines changed
Expand file tree Collapse file tree 4 files changed +33
-25
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ RUN apt-get update && apt-get install -y \
77 libpq-dev \
88 && rm -rf /var/lib/apt/lists/*
99
10- COPY pyproject.toml poetry.lock* ./
11-
12- RUN pip install poetry && \
13- poetry config virtualenvs.create false && \
14- poetry install --no-root --no-dev
10+ # Install Python dependencies directly with pip
11+ RUN pip install fastapi uvicorn sqlmodel psycopg2-binary alembic pydantic python-multipart \
12+ python-jose passlib reportlab
1513
1614COPY . .
1715
Original file line number Diff line number Diff line change @@ -15,20 +15,30 @@ export function ModelDetail() {
1515 const [ newVersionTag , setNewVersionTag ] = useState ( '' ) ;
1616 const [ s3Path , setS3Path ] = useState ( '' ) ;
1717
18- useEffect ( ( ) => {
19- if ( id ) loadVersions ( ) ;
20- } , [ id ] ) ;
21-
22- const loadVersions = async ( ) => {
18+ const fetchVersions = async ( ) => {
2319 if ( ! id ) return ;
2420 try {
2521 const data = await getModelVersions ( parseInt ( id ) ) ;
2622 setVersions ( data ) ;
27- } catch ( error ) {
28- console . error ( "Failed to load versions" , error ) ;
23+ } catch {
24+ console . error ( "Failed to load versions" ) ;
2925 }
3026 } ;
3127
28+ useEffect ( ( ) => {
29+ let cancelled = false ;
30+ ( async ( ) => {
31+ if ( ! id ) return ;
32+ try {
33+ const data = await getModelVersions ( parseInt ( id ) ) ;
34+ if ( ! cancelled ) setVersions ( data ) ;
35+ } catch {
36+ console . error ( "Failed to load versions" ) ;
37+ }
38+ } ) ( ) ;
39+ return ( ) => { cancelled = true ; } ;
40+ } , [ id ] ) ;
41+
3242 const handleAddVersion = async ( ) => {
3343 if ( ! id ) return ;
3444 try {
@@ -40,8 +50,8 @@ export function ModelDetail() {
4050 close ( ) ;
4151 setNewVersionTag ( '' ) ;
4252 setS3Path ( '' ) ;
43- loadVersions ( ) ;
44- } catch ( error ) {
53+ fetchVersions ( ) ;
54+ } catch {
4555 alert ( 'Failed to add version' ) ;
4656 }
4757 } ;
Original file line number Diff line number Diff line change @@ -9,18 +9,18 @@ export function ModelList() {
99 const navigate = useNavigate ( ) ;
1010
1111 useEffect ( ( ) => {
12- loadModels ( ) ;
12+ let cancelled = false ;
13+ ( async ( ) => {
14+ try {
15+ const data = await getModels ( ) ;
16+ if ( ! cancelled ) setModels ( data ) ;
17+ } catch {
18+ console . error ( "Failed to load models" ) ;
19+ }
20+ } ) ( ) ;
21+ return ( ) => { cancelled = true ; } ;
1322 } , [ ] ) ;
1423
15- const loadModels = async ( ) => {
16- try {
17- const data = await getModels ( ) ;
18- setModels ( data ) ;
19- } catch ( error ) {
20- console . error ( "Failed to load models" , error ) ;
21- }
22- } ;
23-
2424 const rows = models . map ( ( model ) => (
2525 < tr key = { model . id } onClick = { ( ) => navigate ( `/models/${ model . id } ` ) } style = { { cursor : 'pointer' } } >
2626 < td > { model . id } </ td >
Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ export interface ComplianceLog {
2727 entity_type : string ;
2828 entity_id : string ;
2929 action : string ;
30- details ?: any ;
30+ details ?: Record < string , unknown > ;
3131 timestamp : string ;
3232}
You can’t perform that action at this time.
0 commit comments