Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cgorringe opened this issue Sep 20, 2012 · 0 comments
Open

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

cgorringe opened this issue Sep 20, 2012 · 0 comments

Comments

@cgorringe
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant