From aa37dc72ac26e5ce9b2d0961da28ee28de7033b9 Mon Sep 17 00:00:00 2001 From: hvelarde Date: Thu, 26 Jan 2017 10:34:43 -0200 Subject: [PATCH 1/2] Handle corner case when upgrade step for 1008 found a collection with no query defined closes #186 --- docs/CHANGES.rst | 3 ++- src/collective/nitf/upgrades/v1008/__init__.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst index adea2118..b546365d 100644 --- a/docs/CHANGES.rst +++ b/docs/CHANGES.rst @@ -4,7 +4,8 @@ There's a frood who really knows where his towel is 1.0b9 (unreleased) ^^^^^^^^^^^^^^^^^^ -- Nothing changed yet. +- Handle corner case when upgrade step for 1008 found a collection with no query defined. + [hvelarde] 1.0b8 (2015-10-16) diff --git a/src/collective/nitf/upgrades/v1008/__init__.py b/src/collective/nitf/upgrades/v1008/__init__.py index ff75dcda..7f2ceaa5 100644 --- a/src/collective/nitf/upgrades/v1008/__init__.py +++ b/src/collective/nitf/upgrades/v1008/__init__.py @@ -24,6 +24,9 @@ def fix_collections(context): except AttributeError: query = obj.getQuery() # Dexterity + if query is None: + continue # collection has no query defined + fixed_query = [] for item in query: fixed_item = dict(item) From 0a725b8730cf55bd7b5fc8d859a59dd7cc1c5fab Mon Sep 17 00:00:00 2001 From: hvelarde Date: Thu, 26 Jan 2017 10:46:49 -0200 Subject: [PATCH 2/2] Fix CI configuration --- .travis.yml | 2 ++ buildout.cfg | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 80e6a46f..7f828bb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ sudo: false cache: directories: - eggs +addons: + firefox: latest-esr env: - PLONE_VERSION=4.2 - PLONE_VERSION=4.3 diff --git a/buildout.cfg b/buildout.cfg index e2c30f6e..fca10ea1 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -43,3 +43,5 @@ scripts = [versions] plone.app.querystring = 1.2.5 +# use latest version of coverage +coverage =