Spaces:
Running
Running
Update app.py
Browse files
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
|