Skip to content

Loading users without all columns (webauthn_id ) causes an error #119

@inspire22

Description

@inspire22

In some places in my app I call things like

User.find_by_sql("select user_id as id, count(id) as cnt

Which breaks when using this gem because of the

        after_initialize do
          self.webauthn_id ||= WebAuthn.generate_user_id
        end

It'd be nice to not break on loading users like this, also we load user objects all over the place to show the user who created an object/etc, so I worry about the overhead of WebAuthn.generate_user_id for all these. It might be enough to just call if has_attribute? but I'm not that familiar with the codebase....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions