Re: Determining if one-to-many relation exists

2006-03-04 Thread Russell Keith-Magee
On 3/2/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Is it worth either fixing the attribute lookup to return None in the > above case, or adding a self.source.exists attribute (returns true or > false)? Then we can truly hide all references to source_id. Hi Malcolm, I'm in the process of

Determining if one-to-many relation exists

2006-03-01 Thread Malcolm Tredinnick
I have been going through some code this morning and moving it over to magic-removal. One of my models has a ForeignKey field that is optionally empty. Before I can attempt to access the value of the ForeignKey, I first need to check that it exists, so I have a few places where the code says