Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plone 5.2.2 #269

Merged
merged 3 commits into from Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
8.0.0b2 (unreleased)
--------------------

- Nothing changed yet.
- Plone 5.2.2 compatibility.
[timo]


8.0.0b1 (2020-06-12)
Expand Down
2 changes: 1 addition & 1 deletion plone-5.2.x.cfg
@@ -1,6 +1,6 @@
[buildout]
extends =
base.cfg
https://dist.plone.org/release/5.2.1/versions.cfg
https://dist.plone.org/release/5.2.2/versions.cfg
find-links += https://dist.plone.org/thirdparty/
versions=versions
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,3 +1,3 @@
# Keep this file in sync with: https://github.com/kitconcept/buildout/edit/master/requirements.txt
setuptools==42.0.2
zc.buildout==2.13.2
zc.buildout==2.13.3
6 changes: 4 additions & 2 deletions src/collective/solr/configure.zcml
Expand Up @@ -98,10 +98,12 @@
</configure>

<adapter
factory=".indexer.BaseIndexable" />
factory=".indexer.BaseIndexable"
provides="collective.solr.interfaces.ICheckIndexable" />

<adapter
factory=".flare.PloneFlare" />
factory=".flare.PloneFlare"
provides="collective.solr.interfaces.IFlare" />

<adapter
for="*
Expand Down
13 changes: 6 additions & 7 deletions src/collective/solr/indexer.py
Expand Up @@ -76,18 +76,17 @@ def datehandler(value):
v.hour(),
v.minute(),
int(v.second()),
v.millis() % 1000
v.millis() % 1000,
)
elif isinstance(value, datetime):
# Convert a timezone aware timetuple to a non timezone aware time
# tuple representing utc time. Does nothing if object is not
# timezone aware
millis = int(value.microsecond / 1000) # 1 second = 1 000 millis = 1 000 000 microsecond
millis = int(
value.microsecond / 1000
) # 1 second = 1 000 millis = 1 000 000 microsecond
value = datetime(*value.utctimetuple()[:6])
value = "%s.%03dZ" % (
value.strftime("%Y-%m-%dT%H:%M:%S"),
millis
)
value = "%s.%03dZ" % (value.strftime("%Y-%m-%dT%H:%M:%S"), millis)
elif isinstance(value, date):
value = "%s.000Z" % value.strftime("%Y-%m-%dT%H:%M:%S")
return value
Expand All @@ -108,7 +107,7 @@ def inthandler(value):
"solr.TrieDateField": datehandler,
"solr.TrieIntField": inthandler,
"solr.IntField": inthandler,
"solr.IntPointField": inthandler
"solr.IntPointField": inthandler,
}


Expand Down