Skip to content

Cannot allow anons to post/score comments #423

Open
@ioistired

Description

when trying to leave a comment as an anon, i get an error like this:

sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "name" of relation "user" violates not-null constraint
DETAIL:  Failing row contains (8, null, null, null, null, anonymous, null, null, gravatar, 1, 0).
[SQL: INSERT INTO "user" (creation_time, last_login_time, version, name, password_hash, password_salt, password_revision, email, rank, avatar_style) VALUES (%(creation_time)s, %(last_login_time)s, %(version)s, %(name)s, %(password_hash)s, %(password_salt)s, %(password_revision)s, %(email)s, %(rank)s, %(avatar_style)s) RETURNING "user".id]
[parameters: {'creation_time': None, 'last_login_time': None, 'version': 1, 'name': None, 'password_hash': None, 'password_salt': None, 'password_revision': 0, 'email': None, 'rank': 'anonymous', 'avatar_style': 'gravatar'}]

I'm trying to allow anons to make/score comments and edit their own comments. If this is not intended to be allowed, then the booru should fail to validate the config on startup and crash. Editing own comments can be implemented using session cookies.

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions