Skip to content

DB initialization steps missing #19

@x3419

Description

@x3419

Hi,
Thanks for this project. After successfully setting up authentication with the OTP, I'm receiving the following error when calling h.targets.get_registered_summary():

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) FOREIGN KEY constraint failed
[SQL: INSERT INTO targets (slug, category, organization, average_payout, codename, date_updated, end_date, is_active, is_new, is_registered, is_updated, last_submitted, start_date, vulnerability_discovery) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: ('scz3994tx0', 1, 'erwff4ugiu', 0.0, 'OPTIMUSDOWNLOAD', 0, 0, 0, 0, 1, 0, 0, 0, 1)]
(Background on this error at: https://sqlalche.me/e/14/gkpj)

This likely indicates that it's trying to insert a row into a table that contains a foreign key field, and the value we're trying to insert into the foreign key field doesn'texist in the table that the foreign key refers to. To resolve this, we would need to make sure that all foreign key values we're inserting already exist in their respective tables. This may be specific to OPTIMUSDOWNLOAD potentially, in which case we may need to add a check to skip that target.

Any help would be greatly appreciated.

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