Mercurial > p > roundup > code
comparison roundup/backends/rdbms_common.py @ 1252:209a47ede743
allow blank passwords again [SF#619714]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 08 Oct 2002 04:11:17 +0000 |
| parents | 6c24a86a12ae |
| children | 9c3459cb8ab6 |
comparison
equal
deleted
inserted
replaced
| 1251:347657425a10 | 1252:209a47ede743 |
|---|---|
| 1 # $Id: rdbms_common.py,v 1.21 2002-10-07 00:52:51 richard Exp $ | 1 # $Id: rdbms_common.py,v 1.22 2002-10-08 04:11:16 richard Exp $ |
| 2 ''' Relational database (SQL) backend common code. | 2 ''' Relational database (SQL) backend common code. |
| 3 | 3 |
| 4 Basics: | 4 Basics: |
| 5 | 5 |
| 6 - map roundup classes to relational tables | 6 - map roundup classes to relational tables |
| 697 continue | 697 continue |
| 698 | 698 |
| 699 # get the property spec | 699 # get the property spec |
| 700 prop = properties[k] | 700 prop = properties[k] |
| 701 | 701 |
| 702 if isinstance(prop, Password): | 702 if isinstance(prop, Password) and v is not None: |
| 703 d[k] = str(v) | 703 d[k] = str(v) |
| 704 elif isinstance(prop, Date) and v is not None: | 704 elif isinstance(prop, Date) and v is not None: |
| 705 d[k] = v.serialise() | 705 d[k] = v.serialise() |
| 706 elif isinstance(prop, Interval) and v is not None: | 706 elif isinstance(prop, Interval) and v is not None: |
| 707 d[k] = v.serialise() | 707 d[k] = v.serialise() |
| 728 | 728 |
| 729 if isinstance(prop, Date) and v is not None: | 729 if isinstance(prop, Date) and v is not None: |
| 730 d[k] = date.Date(v) | 730 d[k] = date.Date(v) |
| 731 elif isinstance(prop, Interval) and v is not None: | 731 elif isinstance(prop, Interval) and v is not None: |
| 732 d[k] = date.Interval(v) | 732 d[k] = date.Interval(v) |
| 733 elif isinstance(prop, Password): | 733 elif isinstance(prop, Password) and v is not None: |
| 734 p = password.Password() | 734 p = password.Password() |
| 735 p.unpack(v) | 735 p.unpack(v) |
| 736 d[k] = p | 736 d[k] = p |
| 737 else: | 737 else: |
| 738 d[k] = v | 738 d[k] = v |
