File tree Expand file tree Collapse file tree
app/src/app/utils/api/apiHandlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const saveMap = async (latestMetadata: DocumentMetadata | null) => {
1818 user_id : useMapStore . getState ( ) . userID ,
1919 copy_from_doc :
2020 mapDocument ?. access === 'read' && mapDocument ?. public_id
21- ? mapDocument ?. public_id
21+ ? ` ${ mapDocument ?. public_id } `
2222 : mapDocument ?. document_id ,
2323 } ) ;
2424
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ async def create_document(
206206 total_assignments = 0
207207
208208 if data .copy_from_doc is not None :
209- copy_document_id = data .copy_from_doc
209+ copy_document_id = parse_document_id ( data .copy_from_doc )
210210 if not copy_document_id :
211211 raise HTTPException (status_code = 404 , detail = "Document not found" )
212212 data .copy_from_doc = copy_document_id
@@ -252,8 +252,11 @@ async def create_document(
252252 )
253253
254254 if data .metadata is not None :
255+ logger .info (
256+ f"Updating metadata for document: { document_id if not data .copy_from_doc else copied_document .document_id } "
257+ )
255258 await update_districtrmap_metadata (
256- document_id = document_id , metadata = data .metadata . dict () , session = session
259+ document = copied_document , metadata = data .metadata , session = session
257260 )
258261
259262 stmt = (
You can’t perform that action at this time.
0 commit comments