File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,15 +249,15 @@ export class DatabaseService {
249249 // Only update scalar fields here; do not pass relation objects directly
250250 update : {
251251 status : projectUser . status ,
252- updated_at : projectUser . updated_at ,
252+ updated_at : projectUser . updated_at || new Date ( ) . toISOString ( ) , // use current timestamp if not provided
253253 } ,
254254 // For creation, explicitly connect required relations instead of passing relation objects
255255 create : {
256256 status : projectUser . status ,
257- created_at : projectUser . created_at ,
258- updated_at : projectUser . updated_at ,
257+ created_at : projectUser . created_at || new Date ( ) . toISOString ( ) , // use current timestamp if not provided
258+ updated_at : projectUser . updated_at || new Date ( ) . toISOString ( ) , // use current timestamp if not provided
259259 project : { connect : { id : projectUser . project_id } } ,
260- user : { connect : { id : projectUser . user_id } }
260+ user : { connect : { id : projectUser . user_id } } ,
261261 }
262262 } )
263263 ) ;
You can’t perform that action at this time.
0 commit comments