Fix wrong error check (#12310)

This commit is contained in:
Pavel Biryukov
2019-09-26 14:26:48 +03:00
committed by Ben Schumacher
parent effb6d8003
commit af3ffeed1a

View File

@@ -87,7 +87,7 @@ func (s SqlAuditStore) PermanentDeleteBatch(endTime int64, limit int64) (int64,
rowsAffected, err1 := sqlResult.RowsAffected()
if err1 != nil {
return 0, model.NewAppError("SqlAuditStore.PermanentDeleteBatch", "store.sql_audit.permanent_delete_batch.app_error", nil, ""+err.Error(), http.StatusInternalServerError)
return 0, model.NewAppError("SqlAuditStore.PermanentDeleteBatch", "store.sql_audit.permanent_delete_batch.app_error", nil, ""+err1.Error(), http.StatusInternalServerError)
}
return rowsAffected, nil
}