Esempio n. 1
0
    def handle(self, request, data):
        try:
            image_id = data['image_id']
            user_name = data['user_name']
            desc = data['description']
            saharaclient.image_update(request, image_id, user_name, desc)

            image_tags = json.loads(data["tags_list"])
            saharaclient.image_tags_update(request, image_id, image_tags)

            messages.success(request, _("Successfully updated image."))

            return True
        except Exception:
            exceptions.handle(request, _("Failed to update image."))
            return False