Merge branch 'master' into 4-mongodb_api

This commit is contained in:
Tobias Eidelpes 2021-01-19 19:00:00 +01:00
commit dddaaaabf6

View File

@ -198,6 +198,7 @@ class ImageEndpoint:
logger.debug('Image DELETE single call: {}'.format(request)) logger.debug('Image DELETE single call: {}'.format(request))
result_bool = True result_bool = True
while identifier is not None:
# get metadata from MongoDB # get metadata from MongoDB
metadata = MongoDBService.getSingle(identifier) metadata = MongoDBService.getSingle(identifier)
@ -213,6 +214,12 @@ class ImageEndpoint:
print('Error deleting file in ' + service.name) print('Error deleting file in ' + service.name)
result_bool = False result_bool = False
identifier = None
if 'previous' in metadata:
identifier = metadata['previous']
if identifier == '':
identifier = None
return JsonResponse({'Result': result_bool}, safe=False) return JsonResponse({'Result': result_bool}, safe=False)
@staticmethod @staticmethod