You are here: Home » Community » IntegrityErorr in validations code

IntegrityErorr in validations code

Post  IntegrityErorr in validations code
Author: saventa  Send Email
Date: 2011-07-11 02:31 PM

hi, when I try to validate the code, the following error accurs,

tanks yuo

Tipo di errore IntegrityError Valore dell'errore ERROR: insert or update on table "site_tokens" violates foreign key constraint "$2" DETAIL: Key (token_id)=(37316) is not present in table "tokens". select nextval(tokens_token_id_seq); insert into tokens (token_id, start_date , service_id , value , customer , self_destruct ) select currval(tokens_token_id_seq) , now() , s.service_id ,52428800 ,mc85000 ,1 from services as s inner join categories as c on c.category_id = s.category_id and s.description = Storage and = objectis ; insert into site_tokens (site_id,token_id) select 18705, currval(tokens_token_id_seq); select token_id from tokens where token_id = currval(tokens_token_id_seq