Skip to content

Commit 1898599

Browse files
committed
修复测试 app 批量新增数据触发触发器问题,以及登入登出设置用户名提交空字符串问题
1 parent 46dd319 commit 1898599

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

example/lib/pages/auth.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,20 @@ class _OtherSettings extends State<OtherSettings> {
402402
ElevatedButton(
403403
child: Text('设置用户名/邮箱/密码'),
404404
onPressed: () async {
405-
Map<String, dynamic> data = {
406-
'email': _emailForUpdate.text,
407-
'username': _usernameForUpdate.text,
408-
'password': _passwordForUpdate.text,
409-
};
405+
Map<String, dynamic> data = {};
406+
407+
if (_emailForUpdate.text != '') {
408+
data['email'] = _emailForUpdate.text;
409+
}
410+
411+
if (_usernameForUpdate.text != '') {
412+
data['username'] = _usernameForUpdate.text;
413+
}
414+
415+
if (_passwordForUpdate.text != '') {
416+
data['password'] = _passwordForUpdate.text;
417+
}
418+
410419
try {
411420
BaaS.CurrentUser currentUser =
412421
await BaaS.Auth.getCurrentUser();

example/lib/pages/schema_batch.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ class _SchemaBatchState extends State<SchemaBatch> {
8585
{"rum": 203, "str": '5a33406909a805412e3169c3'},
8686
];
8787

88-
TableRecordOperationList records = await order.createMany(data);
88+
TableRecordOperationList records =
89+
await order.createMany(data, enableTrigger: false);
8990
Map result = getResult(records);
9091
alert(context, '$result');
9192
} catch (e) {

0 commit comments

Comments
 (0)