Fixed DB entry creation
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Pünkösd Marcell 2020-09-14 02:25:31 +02:00
parent bf18d8e74f
commit bfe2ec8c8c
1 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,12 @@ class CNNView(FlaskView):
# create bucket if necessary
ensure_buckets()
# Create the entry in the db
if info['id']:
m = AIModel(id=info['id'], type=AIModelType.CNN)
else:
m = AIModel(type=AIModelType.CNN)
# Put files into MinIO
storage.connection.put_object(current_app.config['MINIO_CNN_BUCKET_NAME'], "model/" + str(m.id), model_file,
model_file.content_length, content_type=model_file.content_type)