Revision 5509b599 api/images.py

b/api/images.py
219 219
            updated[key] = val
220 220
        except ImageMetadata.DoesNotExist:
221 221
            pass    # Ignore non-existent metadata
222

  
222
    
223
    if updated:
224
        image.save()
225
    
223 226
    return render_metadata(request, updated, status=201)
224 227

  
225 228
@api_method('GET')
......
261 264
    meta, created = ImageMetadata.objects.get_or_create(meta_key=key, image=image)
262 265
    meta.meta_value = metadict[key]
263 266
    meta.save()
267
    image.save()
264 268
    return render_meta(request, meta, status=201)
265 269

  
266 270
@api_method('DELETE')
......
278 282
    image = get_image(image_id, request.user)
279 283
    meta = get_image_meta(image, key)
280 284
    meta.delete()
285
    image.save()
281 286
    return HttpResponse(status=204)

Also available in: Unified diff