nfdi4plants / ARCCommander

Tool to manage your ARCs
MIT License
11 stars 9 forks source link

[Bug] Prevent overwriting #47

Closed Brilator closed 3 years ago

Brilator commented 3 years ago

Adding a new item (e.g. investigation) with duplicate title / title already existing in isa.investigation.xlsx should not just overwrite the existing item.

Reproduce error

  1. arc i create --identifier "investigation_001"
  2. arc i person register -l YourLastname -f YourFirstname -m YourMidInitials
  3. arc i create --identifier "investigation_001"
  4. Person info gone

Suggestion

Check for existing items. Respond with error "already exists" and / or suggest new name.

HLWeil commented 3 years ago

Good point, have you noticed this kind of missbehaviour in other cases too?

Brilator commented 3 years ago

Haven't tested, yet.

Brilator commented 3 years ago

Yes. Complete assay folder is also overwritten.

arc a add -a TestAssay
echo 'bla bla test' > assays/TestAssay/README.md 
arc a add --assayidentifier "TestAssay"
cat assays/TestAssay/README.md