mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-15 16:56:56 +08:00
feat(store): prevent deletion of active strategies and update translations (#1461)
Co-authored-by: Dean <afei.wuhao@gmail.com>
This commit is contained in:
@@ -444,6 +444,9 @@ func (s *StrategyStore) Delete(userID, id string) error {
|
||||
if st.IsDefault {
|
||||
return fmt.Errorf("cannot delete system default strategy")
|
||||
}
|
||||
if st.IsActive {
|
||||
return fmt.Errorf("cannot delete active strategy")
|
||||
}
|
||||
}
|
||||
|
||||
// Check if any trader references this strategy
|
||||
|
||||
Reference in New Issue
Block a user