Skip to content

Commit

Permalink
Merge a3312e8 into bf97828
Browse files Browse the repository at this point in the history
  • Loading branch information
d-maurer committed May 11, 2020
2 parents bf97828 + a3312e8 commit efe1811
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -4,6 +4,9 @@ Changelog
5.2 (unreleased)
----------------

- Update `catalogView.dtml` to changed behavior of empty searches
(`#101 <https://github.com/zopefoundation/Products.ZCatalog/issues/101>`_).

- Fix case where index value is changed to None after previously being indexed.
(`#100 <https://github.com/zopefoundation/Products.ZCatalog/issues/100>`_)

Expand Down
4 changes: 2 additions & 2 deletions src/Products/ZCatalog/dtml/catalogView.dtml
Expand Up @@ -3,8 +3,8 @@

<main class="container-fluid">

<dtml-let filterpath="REQUEST.get('filterpath', '/')"
results="searchResults(path=filterpath)">
<dtml-let filterpath="REQUEST.get('filterpath', '')"
results="searchResults(path=filterpath) if filterpath else list(getAllBrains())">
<dtml-if results>

<h1 class="form-label section-bar">Path filter</h1>
Expand Down
9 changes: 9 additions & 0 deletions src/Products/ZCatalog/tests/test_zcatalog.py
Expand Up @@ -19,6 +19,7 @@
from Acquisition import Implicit
import ExtensionClass
from OFS.Folder import Folder as OFS_Folder
from Testing.makerequest import makerequest


class Folder(OFS_Folder):
Expand Down Expand Up @@ -307,6 +308,14 @@ def testSearchNot(self):
# manage_setProgress
# _getProgressThreshold

def test_catalogView(self):
catalog = makerequest(self._catalog)
# hack `getPhysicalPath` to avoid problem with the catalog plan
catalog.getPhysicalPath = None
vr = catalog.manage_catalogView()
self.assertTrue("There are no objects in the Catalog." not in vr,
"catalogView wrongly reports `no objects`")


class TestAddDelColumnIndex(ZCatalogBase, unittest.TestCase):

Expand Down

0 comments on commit efe1811

Please sign in to comment.