Skip to content

Invalid datetime handling introduced by #82 #83

Description

@fmigneault

@tik65536

Error seems to happen with #82

I'm trying the following request:
http://localhost:8888/dggs-api/collections/manitoba-rcm-ard/dggs/IGEO7/zones?parent-zone=021

Where manitoba-rcm-ard is temporal with datetime defined the usual way.

Image

When reaching this point, the collection gets filtered-out, because ?datetime= was not provided.

cp = collection_provider[v.collection_provider.providerId]
# if the collection consists of datetime_col or timeStamp, then it is a temporal collection
is_temporalcollection = (cp.datasources[v.collection_provider.datasource_id].datetime_col is not None or v.timestamp is not None)
if (include_datetime and not is_temporalcollection):
# skip non-temporal collections
skip_collection.append(k)
# For a non-temporal query, only filter out collections that have a native temporal dimension
if (not include_datetime and cp.datasources[v.collection_provider.datasource_id].datetime_col is not None):
# skip non-temporal collections
skip_collection.append(k)

However, in this specific case, it should be allowed, since datetime does not really matter to list the zones.

(following using crim-ca/pydggsapi @ main)

Image

Similarly, the following fails:
http://localhost:8888/dggs-api/collections/manitoba-rcm-ard/dggs/IGEO7/zones/021/data?zone-depth=0-2

Image

Whereas it worked before (with the extra datetime dimension included):

Image

In this case, ?datetime= could have an impact if there were other collections involved, but since it is on its own, it should not be filtered out.

I did not test when mixing collections with/without temporal, but I would expect it to merge the dimension accordingly rather than filter them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions