Merge branch 'master' into 4-mongodb_api
This commit is contained in:
commit
dddaaaabf6
@ -198,6 +198,7 @@ class ImageEndpoint:
|
||||
logger.debug('Image DELETE single call: {}'.format(request))
|
||||
result_bool = True
|
||||
|
||||
while identifier is not None:
|
||||
# get metadata from MongoDB
|
||||
metadata = MongoDBService.getSingle(identifier)
|
||||
|
||||
@ -213,6 +214,12 @@ class ImageEndpoint:
|
||||
print('Error deleting file in ' + service.name)
|
||||
result_bool = False
|
||||
|
||||
identifier = None
|
||||
if 'previous' in metadata:
|
||||
identifier = metadata['previous']
|
||||
if identifier == '':
|
||||
identifier = None
|
||||
|
||||
return JsonResponse({'Result': result_bool}, safe=False)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user