Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

尝试注册时发生错误 #15

@weiaiweiai

Description

@weiaiweiai

我不太能确定这与我编译步骤有关。
我是直接尝试编译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

State
Permission
IsApiAvailable
image

我终于能够成功登录了

但是似乎登录后依然有问题(如下截图)
image
image
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions