Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
タイプ別一覧画面のタイプリストを「基本」だけの状態でインポートすると、
取り込んだ新規設定の名称が「基本」になり、削除できなくなる不具合への対応。 #134
原因は、読込んだ設定ファイルの設定IDを判定すべきところで、
画面上のリストで選択されている設定の設定IDを使っていたこと。
インポート前に「基本」以外をすべて削除しなければ再現しないバグ。
コードの意図がやや不明瞭なので、周辺コードにコメントを追加。
なお、エクスポートしたタイプ別設定のidを0に変更して取り込んだ場合、
ファイル内の設定名に関わらず「基本」として取り込まれ同様の事象が発生すると考えられる。
この問題に対処するにはタイプ別設定インポートの仕組みを見直す必要があるので、
本PRでは当初報告された問題のみに対応するようにしている。