awacke1 commited on
Commit
5ea11ed
·
verified ·
1 Parent(s): 22817e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -459,6 +459,7 @@ def clone_record(container, clone_id):
459
  existing_doc = container.read_item(item=clone_id, partition_key=clone_id)
460
  new_doc = existing_doc.copy()
461
  new_doc['id'] = generate_unique_id() # Generate new unique ID with timestamp
 
462
  new_doc['createdAt'] = datetime.utcnow().isoformat() # Update the creation time
463
  new_doc['_rid'] = None # Reset _rid or any system-managed fields
464
  new_doc['_self'] = None
 
459
  existing_doc = container.read_item(item=clone_id, partition_key=clone_id)
460
  new_doc = existing_doc.copy()
461
  new_doc['id'] = generate_unique_id() # Generate new unique ID with timestamp
462
+ new_doc['name'] = new_doc['id'] # Generate new unique ID with timestamp
463
  new_doc['createdAt'] = datetime.utcnow().isoformat() # Update the creation time
464
  new_doc['_rid'] = None # Reset _rid or any system-managed fields
465
  new_doc['_self'] = None