zeyadahmedd commited on
Commit
8906687
·
1 Parent(s): ab09b12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -127,7 +127,10 @@ def create(data):
127
  if(not os.path.exists(id)):
128
  return "sorry ,there is no directory for this client"
129
  else:
130
- chroma_client.delete_collection(name=id)
 
 
 
131
  collection = chroma_client.get_or_create_collection(name=id)
132
  print(os.chdir(id))
133
  return create_multiple_db(os.getcwd(),collection,working_dir)+" making data for client"
 
127
  if(not os.path.exists(id)):
128
  return "sorry ,there is no directory for this client"
129
  else:
130
+ try:
131
+ chroma_client.delete_collection(name=id)
132
+ except error:
133
+ pass
134
  collection = chroma_client.get_or_create_collection(name=id)
135
  print(os.chdir(id))
136
  return create_multiple_db(os.getcwd(),collection,working_dir)+" making data for client"