superdesk/superdesk

View on GitHub
server/data_updates/00003_20160829-094134_validators.py

Summary

Maintainability
A
0 mins
Test Coverage
# -*- coding: utf-8; -*-
# This file is part of Superdesk.
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
#
# Author  : petr
# Creation: 2016-08-29 09:41

from superdesk.commands.data_updates import BaseDataUpdate


class DataUpdate(BaseDataUpdate):

    resource = "validators"

    def forwards(self, mongodb_collection, mongodb_database):
        mongodb_collection.update_many(
            {"_id": {"$in": ["publish_embedded_picture", "correct_embedded_picture"]}}, {"$set": {"embedded": True}}
        )

    def backwards(self, mongodb_collection, mongodb_database):
        pass