-
Notifications
You must be signed in to change notification settings - Fork 14
尝试注册时发生错误 #15
Description
我不太能确定这与我编译步骤有关。
我是直接尝试编译North项目,随后直接访问http://127.0.0.1:12121/
2023-11-15 20:29:52 [North Error] Register failed
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'NOT NULL constraint failed: Users.MaxUploadCapacity'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at SqlSugar.AdoProvider.ExecuteCommandAsync(String sql, SugarParameter[] parameters)
at SqlSugar.InsertableProvider1.ExecuteCommandAsync() at North.Core.Repository.Repository1.AddAsync(T entity) in C:\Users\31506\Documents\GitHub\North\src\North.Core\Repository\Repository.cs:line 78
at North.Pages.Auth.Register.UserRegister() in C:\Users\31506\Documents\GitHub\North\src\North\Pages\Auth\Register.razor.cs:line 89
这似乎是在UserEntity 类中缺少重要字段:MaxUploadCapacity
我尝试在UserEntity中 添加了以下字段,注册成功了,但是登录无法跳转
public int MaxUploadCapacity { get; set; } = 0;
public double MaxUploadCapacityByte => MaxUploadCapacity * 1024 * 1024;
随后我在数据库中吧如下字段改为1
我终于能够成功登录了




