[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] That killed it stone dead

From: Ian Haywood
Subject: Re: [Gnumed-devel] That killed it stone dead
Date: Mon, 16 Aug 2004 23:34:29 -0400
User-agent: Mutt/1.3.28i

On Tue, Aug 17, 2004 at 12:59:16PM +1000, Richard Terry wrote:
>  is obviously much better, however when no contentsexist in the database  the 
> patientcolumnslist is set to None, not an empty list,  and it bombs out on 
> the existing logic, i

I have had the same problem: there is no easy way of guarateeing a
default value in the configuration database.

My suggestion would be to extend the "template" configuration files
under client/etc/config-definitions/ to support this.  

> if len(patientcolumnslist)==0:
if not patientcolumnslist or len(patientcolumnslist)==0:

should do the trick. Python does not evaluate the right side of an "or"
if the left is true (similarly it does not evaluate the right of "and"
if the left is false)

> Setting patientcolumnslist=[] prior to this doesn't help, so the logic will 
> need changing.
> It is probably obvious what to do to you, I'm not sure how the if list is none
> regards
> richard
> _______________________________________________
> Gnumed-devel mailing list
> address@hidden

Attachment: pgptuMoHvR1Gf.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]