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

nodes db: return an empty data field for the geojson collection #1169

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

tahini
Copy link
Collaborator

@tahini tahini commented Dec 19, 2024

The data field is mandatory in the NodesAttributes, but it was just dropped from the geojson collection. We instead return an empty object for data, to make sure it exists.

The `data` field is mandatory in the `NodesAttributes`, but it was just
dropped from the geojson collection. We instead return an empty object
for data, to make sure it exists.
@greenscientist
Copy link
Collaborator

Instead of this, should we make it optional and have the people who access it check if it exist?

@greenscientist
Copy link
Collaborator

If we do this, should we undo ee4cddb ???

@tahini
Copy link
Collaborator Author

tahini commented Dec 19, 2024

we can't make it optional, this is a field in GenericObject !!! (but this may also evolve, with the change of uuid to numeric IDs, we won't be able to extend GenericObject as is anymore and we can think of a new and improved way to implement common features in object, using composition and interfaces instead of inheritance, but that's in the long term)

But indeed, we can revert ee4cddb

…laces"

This reverts commit ee4cddb.

The data field is now returned as an empty object, so it will always be
defined again.
@tahini tahini merged commit f1e84f0 into chairemobilite:main Dec 19, 2024
6 checks passed
@tahini tahini deleted the nodesData branch December 19, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants