Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

'with' statment not working in tornado

#227

Transaction isn't rolling back in case of error. Please check the file attached.

how to reprocude error:

run the tornado instance;
access localhost:8080/signup/create;
make a POST request with an empty value for one of the dates;

The exception raised will be:
psycopg2.DataError: invalid input syntax for type date

Error after trying to access the same page:
psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block

python version = 3.4.1
psycopg2 version = 2.5.3
tornado version = 4.0

table users:
Table "public.users" Column | Type | Modifiers ---------------+--------------------------+----------- user_id | integer | first_name | character varying(20) | last_name | character varying(40) | nick_name | character varying(20) | gender | character(1) | birth_date | date | not null country_id | character(2) | created_date | timestamp with time zone | not null news | boolean | last_mod_date | timestamp with time zone | not null Check constraints:
"users_gender_check" CHECK (gender = ANY (ARRAY['m'::bpchar, 'f'::bpchar])) Foreign-key constraints:
"users_country_id_fkey" FOREIGN KEY (country_id) REFERENCES countries(country_id) "users_user_id_fkey" FOREIGN KEY (user_id) REFERENCES credentials(user_id) Disabled triggers:
update_users_date AFTER UPDATE ON users FOR EACH ROW EXECUTE PROCEDURE update_mod_date()

Reported by matheus · August 13th, 2014 @ 04:25 PM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid

    This is not a bug. If you are a beginner and learning how the library works please use the mailing list.

    August 13th, 2014 @ 04:37 PM