-
Notifications
You must be signed in to change notification settings - Fork 1
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
Atlas does not raise an error if an input filename is not unique #84
Comments
Atlas::Input.new(key: 'unique', query: '0.0').save
# => true
Atlas::Input.new(key: 'unique', query: '0.0').save
# => Atlas::DuplicateKeyError: Duplicate key found: unique
# => from atlas/lib/atlas/active_document/manager.rb:95:in `write' |
That's odd. I can reproduce the error with the code you provided but ETEngine never throws an error once you use two inputs with the same name. I'll investigate this further when I've a bit more time. |
But that only checks the uniqueness when writing, not when reading. And since etsource files are often written by hand, this seems to not be enough. What about adding raising an exception if a key occurs twice here? |
I'm not sure checking that is really Atlas' responsibility; as far as it is concerned, you create documents by calling I think my view is:
What I would support is being able to do something This isn't very high-priority IMO. |
👍 |
Related discussion: quintel/etmodel#2324 (comment)
It would be great if Atlas were to know if all the filenames of inputs are unique.
The text was updated successfully, but these errors were encountered: