Skip to content

Commit

Permalink
Fix AttributeError on upgrade step v10900
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Jul 25, 2018
1 parent 97efdcf commit 3d7b1c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
2.0a6 (unreleased)
^^^^^^^^^^^^^^^^^^

- Corrige ``AttributeError`` no upgrade step v10900 (fecha `#448 <https://github.com/plonegovbr/brasil.gov.portal/issues/448>`_).
[hvelarde]

- Atualizado Products.PloneKeywordManager à versão 2.2.1.
[hvelarde]

Expand Down
4 changes: 3 additions & 1 deletion src/brasil/gov/portal/upgrades/v10900/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def remove_nitf_customizations(setup_tool):
types_tool = api.portal.get_tool('portal_types')
nitf = types_tool['collective.nitf.content']
if custom_view in nitf.view_methods:
nitf.view_methods.remove(custom_view)
view_methods = list(nitf.view_methods)
view_methods.remove(custom_view)
nitf.view_methods = tuple(view_methods)
nitf.default_view_fallback = True
logger.info('collective.nitf types tool customizations removed')

Expand Down

0 comments on commit 3d7b1c8

Please sign in to comment.