Fixed DB entry creation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bf18d8e74f
commit
bfe2ec8c8c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user