Skip to content

New Offer "total available" field blank causes crash on login #26

@cgorringe

Description

@cgorringe

When a user creates a New Offer, if the user clears the "Total available" field in the form (which defaults to "1") and leaves it blank, the blank is stored in the database instead of a number. This causes a crash when the user next time checks their home page, since it lists all of the current requests and offers. Since the user's home page is the first page shown after login, it crashes immediately after login.

The issue likely resolves itself once the offer expires.

Here's a query that will detect all offers that could cause this crash:
SELECT id,person_id,name FROM offers WHERE total_available IS NULL OR available_count IS NULL;

Here's a quick fix in the DB:
UPDATE offers SET available_count=1,total_available=1 WHERE id=$ID$;
(Replace $ID$ with id num from previous query)

Still need to fix the underlying code.

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