mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Properly reuturning result from store function so failure is caught. (#9890)
This commit is contained in:
committed by
GitHub
parent
136d8ca5c4
commit
2e4373f91c
@@ -128,9 +128,9 @@ func (s SqlPreferenceStore) save(transaction *gorp.Transaction, preference *mode
|
||||
}
|
||||
|
||||
if count == 1 {
|
||||
s.update(transaction, preference)
|
||||
result = s.update(transaction, preference)
|
||||
} else {
|
||||
s.insert(transaction, preference)
|
||||
result = s.insert(transaction, preference)
|
||||
}
|
||||
} else {
|
||||
result.Err = model.NewAppError("SqlPreferenceStore.save", "store.sql_preference.save.missing_driver.app_error", nil, "Failed to update preference because of missing driver", http.StatusNotImplemented)
|
||||
|
||||
Reference in New Issue
Block a user