1
This commit is contained in:
parent
80af4c5a7e
commit
a81b749b15
@ -84,8 +84,11 @@ async def copy(
|
||||
item['_id'] = get_uid()
|
||||
for report in item['reports']:
|
||||
report_id = report['report_id']
|
||||
new_report = crud.report.get(db, report_id)
|
||||
new_report['_id'] = get_uid()
|
||||
new_report = await crud.report.get(db, report_id)
|
||||
new_report_id = get_uid()
|
||||
new_report['_id'] = new_report_id
|
||||
new_report['project_id'] = dest_project_id
|
||||
report['report_id'] = new_report_id
|
||||
await crud.report.insert_one(db, new_report)
|
||||
|
||||
await crud.dashboard.update_one(db,
|
||||
|
@ -2,4 +2,4 @@ import time
|
||||
|
||||
|
||||
def get_uid():
|
||||
return hex(int(time.time() * 1000 * 10 ** 6))[2:]
|
||||
return hex(int(time.time() * 10 ** 7))[2:]
|
||||
|
Loading…
Reference in New Issue
Block a user