Commit c0187fbb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added skip none to nextes restplus marshal model fields.

parent 50d8f376
Pipeline #53896 passed with stages
in 32 minutes and 1 second
......@@ -67,7 +67,7 @@ metadata_model = api.model('MetaData', {
'shared_with': fields.List(fields.Integer, description='A list of users to share calculations with given by user_id.'),
'_upload_time': RFC3339DateTime(description='Overrride the upload time.'),
'_uploader': fields.Integer(description='Override the uploader with the given user id.'),
'datasets': fields.List(fields.Nested(model=dataset_model), description='A list of datasets.')
'datasets': fields.List(fields.Nested(model=dataset_model, skip_none=True), description='A list of datasets.')
})
calc_metadata_model = api.inherit('CalcMetaData', metadata_model, {
......@@ -76,7 +76,7 @@ calc_metadata_model = api.inherit('CalcMetaData', metadata_model, {
})
upload_metadata_model = api.inherit('UploadMetaData', metadata_model, {
'calculations': fields.List(fields.Nested(model=calc_metadata_model), description='Specific per calculation data that will override the upload data.')
'calculations': fields.List(fields.Nested(model=calc_metadata_model, skip_none=True), description='Specific per calculation data that will override the upload data.')
})
upload_model = api.inherit('UploadProcessing', proc_model, {
......@@ -86,7 +86,7 @@ upload_model = api.inherit('UploadProcessing', proc_model, {
'upload_id': fields.String(
description='The unique id for the upload.'),
# TODO just removed during migration, where this get particularily large
# 'metadata': fields.Nested(model=upload_metadata_model, description='Additional upload and calculation meta data.'),
# 'metadata': fields.Nested(model=upload_metadata_model, description='Additional upload and calculation meta data.', skip_none=True),
'upload_path': fields.String(description='The uploaded file on the server'),
'published': fields.Boolean(description='If this upload is already published'),
'upload_time': RFC3339DateTime(),
......@@ -94,7 +94,7 @@ upload_model = api.inherit('UploadProcessing', proc_model, {
upload_list_model = api.model('UploadList', {
'pagination': fields.Nested(model=pagination_model),
'results': fields.List(fields.Nested(model=upload_model))
'results': fields.List(fields.Nested(model=upload_model, skip_none=True))
})
calc_model = api.inherit('UploadCalculationProcessing', proc_model, {
......@@ -114,8 +114,8 @@ upload_with_calcs_model = api.inherit('UploadWithPaginatedCalculations', upload_
'successes': fields.Integer,
'failures': fields.Integer,
})),
'results': fields.List(fields.Nested(model=calc_model))
}))
'results': fields.List(fields.Nested(model=calc_model, skip_none=True))
}), skip_none=True)
})
upload_operation_model = api.model('UploadOperation', {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment