mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-09-11 19:17:43 +03:00
chore: add limitation when importing csv file (#5381)
This commit is contained in:
parent
24b3d69860
commit
e85dbe724c
@ -347,6 +347,12 @@ impl DatabaseManager {
|
||||
})
|
||||
.await
|
||||
.map_err(internal_error)??;
|
||||
|
||||
// Currently, we only support importing up to 500 rows. We can support more rows in the future.
|
||||
if !cfg!(debug_assertions) && params.rows.len() > 500 {
|
||||
return Err(FlowyError::internal().with_context("The number of rows exceeds the limit"));
|
||||
}
|
||||
|
||||
let result = ImportResult {
|
||||
database_id: params.database_id.clone(),
|
||||
view_id: params.inline_view_id.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user