[Answered ]-Generic Foreign Keys and get_or_create in django 1.0: Broken?

2👍

Look like there’s different logic used in create and get_or_create as in get_or_create there is no source argument but src_object_id and src_content_type but it is easy to resolve this – pass scr_object_id as u.id and src_content_type as u.content_type (same with dest).

Or use try/except & create.

👤sorki

Leave a comment