EOX GitLab Instance

Commit efa211a4 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Due to strange yaml behaviors begin/end times can be strings

parent 16a9bfa4
......@@ -190,10 +190,20 @@ class OpenSearchQuery(Query):
url = urls[mimetype]["url"]
queryables = urls[mimetype]["params"]
if isinstance(self.time_begin, str):
time_begin = self.time_begin
else:
time_begin = self.time_begin.isoformat()
if isinstance(self.time_end, str):
time_end = self.time_end
else:
time_end = self.time_end.isoformat()
mapping = {
"{geo:box}": self.bbox,
"{time:start}": self.time_begin.isoformat(),
"{time:end}": self.time_end.isoformat(),
"{time:start}": time_begin,
"{time:end}": time_end,
"{count}": int(
next(
param["maxInclusive"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment