@requires_admin
    def post(self, project_id):
        project = self._get_project(project_id)
        if project is None:
            return error("Project not found", http_code=404)

        args = self.parser.parse_args()

        for name, value in args.iteritems():
            if value is None:
                continue

            # If we're rolling back a snapshot, take note.
            if name == 'snapshot.current':
                current = Snapshot.get_current(project.id)
                if current:
                    # If value is empty, we're deactivating a snapshot without replacing it,
                    # and that's a downgrade too.
                    replacement = value and Snapshot.query.get(value)
                    if not replacement or current.date_created < replacement.date_created:
                        _report_snapshot_downgrade(project)

            create_or_update(ProjectOption, where={
                'project': project,
                'name': name,
            }, values={
                'value': value,
            })

        return self.respond({})
dataset/ETHPy150Open dropbox/changes/changes/api/project_options_index.py/ProjectOptionsIndexAPIView.post/swapped operands of `<`