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

Improve data validation and consistency #256

Open
Glutexo opened this issue May 5, 2019 · 0 comments
Open

Improve data validation and consistency #256

Glutexo opened this issue May 5, 2019 · 0 comments

Comments

@Glutexo
Copy link
Collaborator

Glutexo commented May 5, 2019

Currently the ORM doesn’t check data consistency very thoroughly. It’s possible to manually (not through the API) to create a host that then causes errors when further manipulated. An example can be that the facts field doesn’t default to an empty dictionary on safe etc.

It would be good to take some measures that would make the data more consistent and the app then durable:

  • Check the data validity and consistency on save to the database. Do not limit the validation checks only to API requests.
  • Set some reasonable default values in a unified ways, e.g. that the facts and system_profile_facts store "{}" instead of "null".

In general, the application is not very friendly to scripting, ad-hoc usages or debugging. Any non-API scripts then become a possibly deadly tool that can botch the database if the developer doesn’t remember all necessary constrains.

@Glutexo Glutexo changed the title Improve that data validation and consistency Improve data validation and consistency May 20, 2019
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

No branches or pull requests

1 participant